Skip to content

Commit b52839e

Browse files
committed
totally disable publishing of non-core subprojects
a with-extreme-prejudice followup to b21b276
1 parent aa420f8 commit b52839e

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

build.sbt

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ scalacOptions in ThisBuild ++= Seq("-deprecation", "-feature")
1010

1111
cancelable in Global := true
1212

13+
val disablePublishing = Seq[Setting[_]](
14+
publishArtifact := false,
15+
// The above is enough for Maven repos but it doesn't prevent publishing of ivy.xml files
16+
publish := {},
17+
publishLocal := {}
18+
)
19+
20+
lazy val root = (project in file("."))
21+
.settings(disablePublishing)
22+
.aggregate(core, junit, scalacheck, testmacros)
23+
1324
lazy val core = project.in(file("core")).settings(scalaModuleSettings).settings(scalaModuleOsgiSettings).settings(
1425
name := "scala-parallel-collections",
1526
OsgiKeys.exportPackage := Seq(s"scala.collection.parallel.*;version=${version.value}"),
@@ -29,21 +40,20 @@ lazy val core = project.in(file("core")).settings(scalaModuleSettings).settings(
2940
)
3041
)
3142

32-
lazy val junit = project.in(file("junit")).settings(
43+
lazy val junit = project.in(file("junit")).settings(disablePublishing).settings(
3344
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test",
3445
testOptions += Tests.Argument(TestFrameworks.JUnit, "-a", "-v"),
35-
fork in Test := true,
36-
publishArtifact := false
46+
fork in Test := true
3747
).dependsOn(testmacros, core)
3848

39-
lazy val scalacheck = project.in(file("scalacheck")).settings(
49+
lazy val scalacheck = project.in(file("scalacheck")).settings(disablePublishing).settings(
4050
libraryDependencies += "org.scalacheck" % "scalacheck_2.12" % "1.13.4",
4151
fork in Test := true,
4252
testOptions in Test += Tests.Argument(TestFrameworks.ScalaCheck, "-workers", "1", "-minSize", "0", "-maxSize", "4000", "-minSuccessfulTests", "5"),
4353
publishArtifact := false
4454
).dependsOn(core)
4555

46-
lazy val testmacros = project.in(file("testmacros")).settings(
56+
lazy val testmacros = project.in(file("testmacros")).settings(disablePublishing).settings(
4757
libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value,
4858
publishArtifact := false
4959
)

0 commit comments

Comments
 (0)