Using javacOptions ++= Seq("-source", "1.7", "-target", "1.7") does not work if you do not have Java sources.
But you can set the target JVM for the Scala compiler in build.sbt or Build.scala:
scalacOptions += "-target:jvm-1.7"
As a result, he prints on JDK 6:
$ sbt clean run [info] Set current project to default-cd5534 (in build file:/tmp/so/) [success] Total time: 0 s, completed 27.10.2013 14:31:43 [info] Updating {file:/tmp/so/}default-cd5534... [info] Resolving org.fusesource.jansi
Note. Perhaps it only works for the latest version of SBT / Scalac.
Schleichardt Oct 27 '13 at 13:36 on 2013-10-27 13:36
source share