I have multiple projects in my sbt build. I\'m trying to upgrade to Scala 2.10 from 2.9.1, so in my build.sbt file I put
scalaVersion := \"2.10.0\"
SBT has a default Scala version. You need to add the scalaVersion
setting to all subprojects if you wish to change it. The most common way of doing that is having a "common settings" value that is added to all projects at the root level, through project/Build.scala
.
I found out scoping the scalaVersion to ThisBuild will set it for all sub-projects. Details are here: http://www.scala-sbt.org/release/docs/Getting-Started/Multi-Project.html at the bottom, but here is what it says:
To set it only once, it is enough to write, in the main build.sbt file, the following line:
scalaVersion in ThisBuild := "2.10.0"