[GRADLE-3023] Scala plugin does not work in Java 8 RC Created: 13/Feb/14 Updated: 04/Jun/14 Resolved: 30/May/14 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | None |
Fix Version/s: | 2.0-rc-1 |
Type: | Bug | ||
Reporter: | Gradle Forums | Assignee: | Unassigned |
Resolution: | Duplicate | Votes: | 30 |
Attachments: | scaladoc.patch |
Description |
The Scala plugin does not work in the latest Java 8 RC (it works fine on Java 7). Scala itself works on Java 8 RC. java version "1.8.0" Gradle 1.10 Build time: 2013-12-17 09:28:15 UTC Groovy: 1.8.6 java.lang.NullPointerException |
Comments |
Comment by Gradle Forums [ 13/Feb/14 ] |
Can you provide the exact error message? |
Comment by Gradle Forums [ 13/Feb/14 ] |
15:52:06.276 [ERROR] [org.gradle.BuildExceptionReporter] |
Comment by Derek Morr [ 25/Mar/14 ] |
I also see this bug on Gradle 1.11 with Java 8 final: Gradle 1.11 Build time: 2014-02-11 11:34:39 UTC Groovy: 1.8.6 |
Comment by Reidar Sollid [ 26/Apr/14 ] |
And in Java 1.8.0_05 Build time: 2014-02-11 11:34:39 UTC Groovy: 1.8.6 |
Comment by Kevin Rands [ 28/Apr/14 ] |
Does anyone know if/when this issue will be addressed? It doesn't appear to be getting much love at the moment, but it effectively renders java8/scala development unusable with gradle until it's resolve. Is there a workaround? |
Comment by Adam Murdoch [ 28/Apr/14 ] |
Kevin Rands - it should be fixed in the 2.0 release (which will be the next release after 1.12). |
Comment by Peter Niederwieser [ 30/May/14 ] |
Duplicate of |
Comment by Bernie Schelberg [ 31/May/14 ] |
For those that can't wait for Gradle 2 for this issue to be resolved, I've created some patched versions here: https://github.com/10QueensRoad/gradle/releases/download/REL_1.10-java8/gradle-1.10-bin.zip You can download them and use them directly, or change your wrapper configuration to: build.gradle task wrapper(type: Wrapper) { gradleVersion = '1.12' distributionUrl = "https://github.com/10QueensRoad/gradle/releases/download/REL_${gradleVersion}-java8/gradle-${gradleVersion}-bin.zip" } I had some issues uploading 1.11, but patched version of 1.10 and 1.12 are there. Sorry, github also refused to accept the *-all.zip files. If you're using some other version, you can also apply the patch yourself, I've attached it here (scaladoc.patch). |
Comment by Bernie Schelberg [ 04/Jun/14 ] |
Please note that if you want sourceCompatibility greater than 1.7, you must use incremental compilation for any ScalaCompile tasks. See section 25.10 of the Gradle User Guide for details. The issue seems to be in the Ant plugin (see scala.tools.ant.Scalac.Target), Scala compilation itself (using Zinc) seems to be working fine. |