Skip to content

Commit 52cd082

Browse files
authored
Merge pull request #3072 from allanrenucci/dist
Simplify dist project definitions
2 parents 1af3894 + fe4ba25 commit 52cd082

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

project/Build.scala

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,21 +1133,21 @@ object Build {
11331133
state
11341134
}
11351135

1136+
lazy val commonDistSettings = packSettings ++ Seq(
1137+
publishArtifact := false,
1138+
packGenerateMakefile := false,
1139+
packExpandedClasspath := true,
1140+
packResourceDir += (baseDirectory.value / "bin" -> "bin"),
1141+
packArchiveName := "dotty-" + dottyVersion
1142+
)
1143+
11361144
lazy val dist = project.
11371145
dependsOn(`dotty-interfaces`).
11381146
dependsOn(`dotty-compiler`).
11391147
dependsOn(`dotty-library`).
11401148
dependsOn(`dotty-doc`).
11411149
settings(commonNonBootstrappedSettings).
1142-
settings(packSettings).
1143-
settings(
1144-
publishArtifact := false,
1145-
// packMain := Map("dummy" -> "dotty.tools.dotc.Main"),
1146-
packGenerateMakefile := false,
1147-
packExpandedClasspath := true,
1148-
packResourceDir += (baseDirectory.value / "bin" -> "bin"),
1149-
packArchiveName := "dotty-" + dottyVersion
1150-
)
1150+
settings(commonDistSettings)
11511151

11521152
// Same as `dist` but using bootstrapped projects.
11531153
lazy val `dist-bootstrapped` = project.
@@ -1156,14 +1156,8 @@ object Build {
11561156
dependsOn(`dotty-compiler-bootstrapped`).
11571157
dependsOn(`dotty-doc-bootstrapped`).
11581158
settings(commonBootstrappedSettings).
1159-
settings(packSettings).
1159+
settings(commonDistSettings).
11601160
settings(
1161-
target := baseDirectory.value / "target", // override setting in commonBootstrappedSettings
1162-
publishArtifact := false,
1163-
// packMain := Map("dummy" -> "dotty.tools.dotc.Main"),
1164-
packExpandedClasspath := true,
1165-
packGenerateMakefile := false,
1166-
packResourceDir += (baseDirectory.value / "bin" -> "bin"),
1167-
packArchiveName := "dotty-" + dottyVersion
1161+
target := baseDirectory.value / "target" // override setting in commonBootstrappedSettings
11681162
)
11691163
}

0 commit comments

Comments
 (0)