Skip to content

Commit 991b198

Browse files
committed
Add publishSettings to commonSettings
Not having publishSettings set does not prevent publishing, we should set publishArtifact := false on such projects instead.
1 parent eaedfa7 commit 991b198

File tree

1 file changed

+12
-21
lines changed

1 file changed

+12
-21
lines changed

project/Build.scala

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ object Build {
6565
// Shorthand for compiling a docs site
6666
lazy val dottydoc = inputKey[Unit]("run dottydoc")
6767

68-
lazy val commonSettings = Seq(
68+
lazy val commonSettings = publishSettings ++ Seq(
6969
scalaVersion := scalacVersion,
7070
version := dottyVersion,
7171
organization := dottyOrganization,
@@ -133,8 +133,7 @@ object Build {
133133

134134
addCommandAlias("run", "dotty-compiler/run") ++
135135
addCommandAlias("legacyTests", "dotty-compiler/testOnly dotc.tests")
136-
).
137-
settings(publishing)
136+
)
138137

139138
// Meta project aggregating all bootstrapped projects
140139
lazy val `dotty-bootstrapped` = project.
@@ -155,8 +154,7 @@ object Build {
155154
EclipseKeys.projectFlavor := EclipseProjectFlavor.Java,
156155
//Remove javac invalid options in Compile doc
157156
javacOptions in (Compile, doc) --= Seq("-Xlint:unchecked", "-Xlint:deprecation")
158-
).
159-
settings(publishing)
157+
)
160158

161159
// Settings shared between dotty-doc and dotty-doc-bootstrapped
162160
lazy val dottyDocSettings = Seq(
@@ -216,7 +214,7 @@ object Build {
216214
dependsOn(`dotty-compiler`, `dotty-compiler` % "test->test").
217215
settings(commonSettings).
218216
settings(dottyDocSettings).
219-
settings(publishing)
217+
settings(publishSettings)
220218

221219
lazy val `dotty-doc-bootstrapped` = project.in(file("doc-tool")).
222220
dependsOn(`dotty-compiler-bootstrapped`, `dotty-compiler-bootstrapped` % "test->test").
@@ -502,8 +500,7 @@ object Build {
502500
"dotty-compiler-test" -> (packageBin in Test).value
503501
) map { case (k, v) => (k, v.getAbsolutePath) }
504502
}
505-
).
506-
settings(publishing)
503+
)
507504

508505
lazy val `dotty-compiler-bootstrapped` = project.in(file("compiler")).
509506
dependsOn(`dotty-library-bootstrapped`).
@@ -544,7 +541,7 @@ object Build {
544541
lazy val `dotty-library` = project.in(file("library")).
545542
settings(commonSettings).
546543
settings(dottyLibrarySettings).
547-
settings(publishing)
544+
settings(publishSettings)
548545

549546
lazy val `dotty-library-bootstrapped` = project.in(file("library")).
550547
settings(commonSettings).
@@ -629,8 +626,7 @@ object DottyInjectedPlugin extends AutoPlugin {
629626
""")
630627
}
631628
*/
632-
).
633-
settings(publishing)
629+
)
634630

635631
/** A sandbox to play with the Scala.js back-end of dotty.
636632
*
@@ -721,8 +717,7 @@ object DottyInjectedPlugin extends AutoPlugin {
721717
settings(commonSettings).
722718
settings(
723719
crossPaths := false
724-
).
725-
settings(publishing)
720+
)
726721

727722
// sbt >= 0.13.12 will automatically rewrite transitive dependencies on
728723
// any version in any organization of scala{-library,-compiler,-reflect,p}
@@ -735,26 +730,22 @@ object DottyInjectedPlugin extends AutoPlugin {
735730
settings(commonSettings).
736731
settings(
737732
crossPaths := false
738-
).
739-
settings(publishing)
733+
)
740734
lazy val `scala-reflect` = project.
741735
settings(commonSettings).
742736
settings(
743737
crossPaths := false,
744738
libraryDependencies := Seq("org.scala-lang" % "scala-reflect" % scalaVersion.value)
745-
).
746-
settings(publishing)
739+
)
747740
lazy val scalap = project.
748741
settings(commonSettings).
749742
settings(
750743
crossPaths := false,
751744
libraryDependencies := Seq("org.scala-lang" % "scalap" % scalaVersion.value)
752-
).
753-
settings(publishing)
745+
)
754746

755-
lazy val publishing = Seq(
747+
lazy val publishSettings = Seq(
756748
publishMavenStyle := true,
757-
publishArtifact := true,
758749
isSnapshot := version.value.contains("SNAPSHOT"),
759750
publishTo := {
760751
val nexus = "https://oss.sonatype.org/"

0 commit comments

Comments
 (0)