Questions tagged [scala-version-cross-build]

9 questions
3
votes
1 answer

Cross-building Scala libraries

I would like to cross-build some of my Bazel targets to Scala 2.12 and 2.13. As a further point of complexity, I need to be able to express cross-target dependencies (eg. some 2.13 target may have a Bazel dependency on a 2.12 target). Note: this…
Alec
  • 31,829
  • 7
  • 67
  • 114
3
votes
1 answer

sbt scripted plugin fails as an unresolved dependency on publishing cross-compiled scala versions

Our play-googleauth library is built on Scala 2.12, and cross-compiled to Scala 2.11, using sbt 1.1.6. As the library is intended to be run in Play projects, we've historically provided an example standalone Playframework project that uses the…
2
votes
1 answer

Is it possible to enforce different scala version for a specific dependency using SBT

I'm pretty new to scala. While upgrading a multi-module project to Scala 2.13, I found this dependency that is compiled in Scala 2.12 which throws class not found exception during runtime java.lang.NoClassDefFoundError:…
trel
  • 21
  • 3
2
votes
1 answer

How to force sbt to resolve dependencies with scalaVersion compatible with the dependent project

Consider the following contents of some build.sbt and no source code in particular: lazy val y = (project in file("y")) .settings( scalaVersion := "2.11.8", ) .dependsOn(x) lazy val x = (project in file("x")) .settings( …
1
vote
2 answers

Lost on migrating from Scala 2.13 to 3.2

I have been following the instructions on the migration guide with no success. I already have an SBT project that cross-compiles without problems, with the following build.sbt: lazy val ttv = (project in file(".")) .settings( name := "Tame the…
Daniel Langdon
  • 5,899
  • 4
  • 28
  • 48
1
vote
1 answer

Building a cross-build sbt project in Intellij

I have a sbt project with three modules A, B, Common wherein A is compatible with scala version of 2.11.12 and depends on Common B is compatible with scala version of 2.12.7 and depends on Common Common can cross compile with both 2.11.12, 2.12.7…
1
vote
1 answer

cross-build artifacts being built but not with `releaseCrossBuild := true`

I'm trying to release a version of https://github.com/guardian/marley cross-built for Scala v2.11 & v2.12. All code dependencies are satisfied, and both +test and +publishLocalSigned work as expected, the latter definitely producing artifacts for…
Roberto Tyley
  • 24,513
  • 11
  • 72
  • 101
0
votes
1 answer

How to integrate sbt-protoc and scalapb with sbt cross build?

I have a library that needs two different versions of "com.thesamet.scalapb" %% "compilerplugin" depending on the Scala version. In my project/scalapb.sbt I have this code: def scalapbVersion(version:String): String = if(version == "2.11") { …
angelcervera
  • 3,699
  • 1
  • 40
  • 68
0
votes
1 answer

when specify the scalaVersion and sbtVersion to resolve the plugin dependencies via “extra”,it doesn't work

I'm trying to add a plugin like this : addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.11.2" extra ("scalaVersion" -> "2.10", "sbtVersion" -> "0.13")) But when I start sbt session ,the search path still be…