Skip to content

Commit a7333ec

Browse files
committed
Document packaging vs structure PackagingMethod split in ScalaDoc
Done by Codex
1 parent e48f7f5 commit a7333ec

2 files changed

Lines changed: 22 additions & 1 deletion

File tree

packaging/src/main/scala/org/jetbrains/sbtidea/packaging/PackagingMethod.scala

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@ package org.jetbrains.sbtidea.packaging
22

33
import sbt.Project
44

5+
/**
6+
* User-facing, sbt-bound packaging model used in sbt settings (for example, `packageMethod := ...`).
7+
*
8+
* This type intentionally depends on sbt API (`MergeIntoOther` stores an `sbt.Project`) and keeps
9+
* user-friendly defaults in constructors (`DepsOnly()` and `Standalone()`), because it is part of the
10+
* sbt configuration DSL.
11+
*
12+
* During extraction this value is converted into the sbt-agnostic
13+
* [[org.jetbrains.sbtidea.packaging.structure.PackagingMethod]] by
14+
* [[org.jetbrains.sbtidea.packaging.structure.sbtImpl.SbtPackagingStructureExtractor.keys2Structure]].
15+
*
16+
* History:
17+
* - 2019-08: split into two models (sbt-facing + structure-facing) during structure extraction refactoring.
18+
* - 2021-03: this sbt-facing type was extracted from `PackagingDefs` into its own file.
19+
*/
520
sealed trait PackagingMethod
621

722
object PackagingMethod {
@@ -11,4 +26,4 @@ object PackagingMethod {
1126
final case class MergeIntoOther(project: Project) extends PackagingMethod
1227
final case class Standalone(targetPath: String = "", static: Boolean = false) extends PackagingMethod
1328
final case class PluginModule(moduleName: String, static: Boolean = false) extends PackagingMethod
14-
}
29+
}

packaging/src/main/scala/org/jetbrains/sbtidea/packaging/structure/PackagingMethod.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
package org.jetbrains.sbtidea.packaging.structure
22

3+
/**
4+
* Internal, sbt-agnostic packaging model used by extracted project structure.
5+
*
6+
* See [[org.jetbrains.sbtidea.packaging.PackagingMethod]] for the rationale and the difference
7+
* between sbt-facing and structure-facing representations.
8+
*/
39
sealed trait PackagingMethod
410

511
object PackagingMethod {

0 commit comments

Comments
 (0)