[GRADLE-3093] Enable to setup a simple scala build Created: 27/May/14 Updated: 05/Aug/14 Resolved: 05/Aug/14 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | None |
Fix Version/s: | 2.0-rc-1 |
Type: | Task | ||
Reporter: | Gradle Forums | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Description |
Hi, I'm using sala 1.10 and I'm unable to setup a scala build thanks to the scala plugin. I'm a newbie with gradle. Can someone help me ? Thanks |
Comments |
Comment by Gradle Forums [ 27/May/14 ] |
Can you provide a reproducible example? Meanwhile, you can study the Scala chapter in the [Gradle User Guide]([1]http://gradle.org/docs/current/usergu...), check out the Scala sample builds in the full Gradle distribution, or use `gradle init --type scala-library` to create a working skeleton for a Scala build. |
Comment by Gradle Forums [ 27/May/14 ] |
Same error when I run : $ gradle init --type scala-library Please see the stacktrace in the [gist]([1]https://gist.github.com/pjean/8469878) |
Comment by Gradle Forums [ 27/May/14 ] |
I can't reproduce this, and I wonder if it's at all related to Gradle's Scala support. (Can you verify this?) My best guess is that your JDK installation isn't clean (e.g. you have some libs in `jre/lib`) or your Gradle installation is corrupted. Can you show the output of `gradle -v`? |
Comment by Gradle Forums [ 27/May/14 ] |
------------------------------------------------------------ Build time: 2013-12-17 09:28:15 UTC Groovy: 1.8.6 |
Comment by Gradle Forums [ 27/May/14 ] |
Perhaps your Scala version isn't compatible with Java 1.8 (I'm not sure if any released Scala version is). Can you try if running Gradle with JDK 1.7 solves the problem? If this also happens when using, say, the Java plugin, rather than the Scala plugin, then it might be a problem with Gradle and Java 8, and a reproducible example would be appreciated. |
Comment by Gradle Forums [ 27/May/14 ] |
I set up my JAVA_HOME to use 1.7 and it works fine. Thanks for your help UPDATE : Gradle and Java plugin works fine with Java 8 |
Comment by Gradle Forums [ 27/May/14 ] |
This may be a bug in Java 8. getPropertyType() allows for returning null and it is called in the parameter list of isAssignableFrom(), which does not allow for nulls. Relevent code: if (isAssignable(gpd.getPropertyType() /* Can return null /, pd.getPropertyType() / Can return null */)) { Relevent breaking patch to the JDK: [1]http://hg.openjdk.java.net/hsx/hotspo... |
Comment by Gradle Forums [ 27/May/14 ] |
------------------------------------------------------------ Build time: 2013-12-17 09:28:15 UTC Groovy: 1.8.6 |
Comment by Gradle Forums [ 27/May/14 ] |
generates an exception : Could not create task of type 'ScalaDoc' |
Comment by Gradle Forums [ 27/May/14 ] |
bug in Gradle |
Comment by Gradle Forums [ 27/May/14 ] |
I get the same error with Gradle 1.10 and the latest Java 8 RC. I don't get the error with Java 7. And I don't have any issues with running Scala itself on Java 8 RC. So it seems like Gradle 1.10 (or the Scala plugin of Gradle 1.10) is incompatible with the latest Java 8 RC. java version "1.8.0" ------------------------------------------------------------ Build time: 2013-12-17 09:28:15 UTC Groovy: 1.8.6 java.lang.NullPointerException |
Comment by Gradle Forums [ 27/May/14 ] |
goodbye gradle... |
Comment by Gradle Forums [ 27/May/14 ] |
Well I had to downgrade to Java 7. Basically my fault to use a beta software but I hope gradle to fix this shortly. |
Comment by Gradle Forums [ 27/May/14 ] |
I have the same issue with java version "1.8.0_05", scala-2.10.3 and gradle-1.11 |
Comment by Gradle Forums [ 27/May/14 ] |
Issue is still there, gradle-1.12, scala 2.10.4, jdk 1.8.0_05 |
Comment by Gradle Forums [ 27/May/14 ] |
Try with 2.0 nightly. 2.0 will be the first Gradle version that officially supports to be run with Java 8. |
Comment by Gradle Forums [ 27/May/14 ] |
Just tried both 2.0 and 2.1 snapshots (gradle-2.0-20140515233139+0000 and gradle-2.1-20140526220021+0000) - neither worked. |
Comment by Gradle Forums [ 27/May/14 ] |
Thanks. We'll try to fix it for 2.0. |