-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
+publish(Signed) fails with "Repository for publishing is not specified." when crossScalaVersions are not identical #130
Comments
This happens because it's trying to publish the implicitly created root project. You need to disable publishing of the root project altogether with something like publish / skip := true
publishSigned / skip := true at the top level of your |
Hmm, that just gives
also - should it be |
Here is the whole picture for
As you can see, scala.js is accidentally published multiple times, although it should not appear in the 2.12 cycle. |
Yes, it should. Sorry. I updated my message. I have no idea how
|
yes, I'm doing that now (two separate publishes); still, I guess it's a bug somewhere |
I think one of the problems is that changing from |
This really has nothing to do with lazy val rootJVM = project.in(file("jvm"))
.settings(publishSettings)
.settings(sharedSourceSettings)
.settings(
scalaVersion := "2.13.3"
)
.settings(
crossScalaVersions := Seq("2.13.3", "2.12.12"),
)
lazy val rootJS = project.in(file("js"))
.enablePlugins(ScalaJSPlugin)
.settings(publishSettings)
.settings(sharedSourceSettings)
.settings(
scalaVersion := "2.13.3"
)
lazy val sharedSourceSettings = Def.settings(
Compile / unmanagedSourceDirectories += baseDirectory.value.getParentFile / "shared/src/main/scala",
Test / unmanagedSourceDirectories += baseDirectory.value.getParentFile / "shared/src/test/scala",
) If you manage to make it work with two separate projects that are manually configured, and it still doesn't work with the equivalent configuration using Until then, my assessment is that it has nothing to do with sbt-crossproject, and everything to do with sbt's broken aggregation mechanism combined with the not-so-broken-anymore |
Currently bumping into the same issue but will follow the development on sbt/sbt#6193. |
For me it works if I set Note: I follow the recommended layout of having a root project which aggregates the cross project(s). |
e.g. only publishing against Scala 2.13 for Scala.js:
Here,
sbt +publishSigned
uploads the JVM artefact for Scala 2.12, and the JS artefact for Scala 2.13, but fails to upload the JVM artefact for Scala 2.13, instead failing withExample
The text was updated successfully, but these errors were encountered: