[GRADLE-2662] ant:scalac using target jvm-1.5 Created: 29/Jan/13 Updated: 23/Apr/13 Resolved: 30/Mar/13 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | None |
Fix Version/s: | 1.5-rc-1 |
Type: | Bug | ||
Reporter: | Gradle Forums | Assignee: | Peter Niederwieser |
Resolution: | Fixed | Votes: | 1 |
Description |
Question: Is there a way to change the JDK version being used by scalac? |
Comments |
Comment by Gradle Forums [ 29/Jan/13 ] |
The Gradle ANT task for scalac doesn't appear to respect global targetCompatibility...I couldn't trace down the exact issue, but did come up with this workaround: tasks.withType(ScalaCompile) { |
Comment by Gradle Forums [ 29/Jan/13 ] |
Until Scala 2.10, the `scalac` Ant task only supported `jvm-1.5` (and `msil`). Starting with Gradle 1.3 and Scala 2.10, `targetCompatibility` should take effect (otherwise it's a bug). |
Comment by Sonny To [ 19/Feb/13 ] |
targetCompatibility is still not respected. tested on gradle 1.4 and scala 2.10 however, your hack works: tasks.withType(ScalaCompile) { scalaCompileOptions.additionalParameters = ['-target:jvm-1.6'] } |