Is it possible to configure SBT to use a completely different library version when cross building, depending on the scala version the project is being built with?
Fo
Something like this should work:
libraryDependencies <+= scalaVersion(scalatestDependency(_))
def scalatestDependency(scalaVersion: String) = scalaVersion match {
case "2.9.2" => "org.scalatest" % "scalatest_2.9.2" % "2.0.M5" % "test"
case "2.10.0" => "org.scalatest" % "scalatest_2.10.0-RC5" % "2.0.M5-B1" % "test"
}
I assumed that you actually meant that the library versions should be the other way around? :-)
You can see variations on this theme in the ScalaMock 2 build.