How can I change Scala version in a sbt project?
I would like SBT to check whether the system’s Scala version is correct and if it is not the case then download it.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
xsbt (0.10+, including the latest 0.13.7)
Change
scalaVersioninbuild.sbtto whatever Scala version your project should be using – see .sbt build definition.sbt:
As mentioned in RunningSBT, you can:
But the CrossBuild page is more suited for what you want, as it shows in action how to change the
build.scala.versionsproperty.So you should be able to
and each time trigger a compilation with a different Scala version.