Skip to content

Commit 9239dcd

Browse files
authored
Merge pull request #14 from SethTisue/disable-unwanted-publishing-with-extreme-prejudice
totally disable publishing of non-core subprojects
2 parents c60ef6c + e38e892 commit 9239dcd

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

build.sbt

+12-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ 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+
disablePublishing // in root
21+
1322
lazy val core = project.in(file("core")).settings(scalaModuleSettings).settings(scalaModuleOsgiSettings).settings(
1423
name := "scala-parallel-collections",
1524
OsgiKeys.exportPackage := Seq(s"scala.collection.parallel.*;version=${version.value}"),
@@ -33,17 +42,17 @@ lazy val junit = project.in(file("junit")).settings(
3342
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test",
3443
testOptions += Tests.Argument(TestFrameworks.JUnit, "-a", "-v"),
3544
fork in Test := true,
36-
publishArtifact := false
45+
disablePublishing
3746
).dependsOn(testmacros, core)
3847

3948
lazy val scalacheck = project.in(file("scalacheck")).settings(
4049
libraryDependencies += "org.scalacheck" % "scalacheck_2.12" % "1.13.4",
4150
fork in Test := true,
4251
testOptions in Test += Tests.Argument(TestFrameworks.ScalaCheck, "-workers", "1", "-minSize", "0", "-maxSize", "4000", "-minSuccessfulTests", "5"),
43-
publishArtifact := false
52+
disablePublishing
4453
).dependsOn(core)
4554

4655
lazy val testmacros = project.in(file("testmacros")).settings(
4756
libraryDependencies += scalaOrganization.value % "scala-compiler" % scalaVersion.value,
48-
publishArtifact := false
57+
disablePublishing
4958
)

0 commit comments

Comments
 (0)