문제

How can I set target JVM version in SBT? In Maven (with maven-scala-plugin) it can be done as follows:

<plugin>
...
    <configuration>
      <scalaVersion>${scala.version}</scalaVersion>
      <args>
         <arg>-target:jvm-1.5</arg>
      </args>
    </configuration>
</plugin>
도움이 되었습니까?

해결책

You can specify compiler options in the project definition:

javacOptions ++= Seq("-source", "1.8", "-target", "1.8") 

다른 팁

As suggested by others in comments, the current sbt version (1.0, 0.13.15) uses the following notation for setting source and target JVMs.

javacOptions ++= Seq("-source", "1.8", "-target", "1.8")
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top