I have dependencies in my build.sbt that don't have specific builds for the Scala 2.9.0-1 I'm using, instead I'm supposed to use the build for 2.9.0. How to configure the build so that it determines that without specifying the exact version for each dependency? For instance subcut doesn't have a build for 2.9.0-1.
Some lines off my build.sbt:
...
scalaVersion := "2.9.0-1"
libraryDependencies ++= Seq(
"org.scala-tools" %% "subcut" % "0.8"
)
...
I'd rather avoid this:
"org.scala-tools" % "subcut_2.9.0" % "0.8"
Something along the lines of specifying multiple versions it'd try in the specified order.
Here's what I've done:
libraryDependencies <++= (scalaVersion) { (v) =>
val scalaVersionString = v match {
case "2.9.0-1" => "2.9.0"
case _ => v
}
Seq(
"org.scala-tools.testing" % ("scalacheck_" + scalaVersionString) % "1.8" % "test" withSources,
"org.specs2" %% "specs2" % "1.3" % "test" withSources,
"com.github.dmlap" %% "sizeof" % "0.1" % "test" from "http://cloud.github.com/downloads/dmlap/jvm-sizeof/jvm-sizeof-0.1.jar"
)
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With