build.sbt

How to set the Scala version in the SBT build.sbt configuration file

SBT FAQ: How do I set the desired Scala compiler version in the SBT build.sbt configuration file?

Set the value of the scalaVersion variable in your SBT build.sbt file. For instance, to use Scala 2.9.2, put an entry like this in the build.sbt file:

scalaVersion := "2.9.2"

To use Scala 2.10.0, put an entry like this in the build.sbt file:

Scala SBT and build.sbt syntax and examples

Note: This page is very much a work in progress.

A sample Scala SBT build.sbt file, including the last line, which handles the SBT 're-run with -deprecation for details' warning message. (If you get the 're-run with -deprecation' message, that last line hands the "-deprecation" option over to the compiler, so you can see the deprecation problems.)

Syndicate content