Cross in sbt since 2.10.0

I am rebuilding a scala project with sbt 12.1.

crossScalaVersions := Seq("2.9.2", "2.10.0") 

However, it cannot find the dependencies because they are called _2.10 not _2.10.0 . It seems like they usually call your library 2.10 instead of 2.10.0 , with the exception of scala-language and scala-compiler . For example, scalaz was not found at http://repo1.maven.org/maven2/org/scalaz/scalaz-core_2.10.0/6.0.4/scalaz-core_2.10.0-6.0.4.pom , but http: // repo1 .maven.org / maven2 / org / scalaz / scalaz-core_2.10 / 6.0.4 / scalaz-core_2.10-6.0.4.pom .

Is there an easy way to handle this without writing custom rules for all my dependencies?

The actual build.sbt file is available online .

+4
source share
2 answers

Since versions 2.10.x compatible with each other, bits are compatible, libraries should be built with only one version of the scala library, and they can (and should) refuse the .0 part (if you publish using sbt, this is done automatically). When the library keeper frees the library with the _2.10.0 tag, this is an error, and you should consider the error.

By the way, I looked at your build.sbt - running +compile , it works for me (sbt 0.12.1). Are you experiencing some errors?

+2
source

To get the version of Scala included in the name of an artifact in Scala, you define a dependency with the %% operator:

 libraryDependencies += "io.backchat.jerkson" %% "jerkson" % "0.7.0" 

If an exact match is not available, you can explicitly specify the version of Scala (but remember that compatibility exists only for patches releases of a given major / minor Scala release):

 libraryDependencies += "io.backchat.jerkson" % "jerkson_2.9.2" % "0.7.0" 
0
source

All Articles