Hello Gradle devs,
In my build I use the Groovy class ConfigSlurper. With Java 8 I run into issues with the ConfigSlurper class. I may have located the issue. The issue have been fixed as of Groovy 1.8.9 and I would suggest that the Groovy version distributed with Gradle is upgraded from its current 1.8.6 version.
Groovy Jiras ============ http://stackoverflow.com/questions/9625077/grails-application-failed-to-run-in-googleappengine-due-to-hashmapentry-classno http://jira.codehaus.org/browse/GROOVY-4950
Gradle Change Needed ==================== File: dependencies.gradle groovy: ‘org.codehaus.groovy:groovy-all:1.8.9@jar’
Tests:
======
cat > kalle.gradle
File file = new File("test.gradle")
def slurper = new ConfigSlurper().parse(file.text)
println "Status: " + slurper.ext.success
cat > test.gradle
ext {
success = 'success'
}
Groovy 1.8.6 (Gradle 1.11)
============
s@cft639:~/groovytest$ gradle -b kalle.gradle --no-daemon
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: http://gradle.org/docs/1.11/userguide/gradle_daemon.html.
Parallel execution is an incubating feature.
FAILURE: Build failed with an exception.
* Where:
Build file '/home/s/groovytest/kalle.gradle' line: 2
* What went wrong:
A problem occurred evaluating root project 'groovytest'.
> [Ljava/util/HashMap$Entry;
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 5.529 secs
Groovy 1.8.9: Replaced groovy 1.8.6 with 1.8.9 jar
===================================================
s@cft639:~/groovytest$ gradle -b kalle.gradle --no-daemon
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: http://gradle.org/docs/1.11/userguide/gradle_daemon.html.
Parallel execution is an incubating feature.
Status: success
:help
Welcome to Gradle 1.11.
To run a build, run gradle <task> ...
To see a list of available tasks, run gradle tasks
To see a list of command-line options, run gradle --help
BUILD SUCCESSFUL
Total time: 3.64 secs
Groovy 1.8.9: Updated dependencies.gradle in gradle build and made a new distribution
=======================================================================
s@cft639:~/groovytest$ gradle -b kalle.gradle --no-daemon
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: http://gradle.org/docs/2.0-20140319132910+0000/userguide/gradle_daemon.html.
Parallel execution is an incubating feature.
Status: success
:help
Welcome to Gradle 2.0-20140319132910+0000.
To run a build, run gradle <task> ...
To see a list of available tasks, run gradle tasks
To see a list of command-line options, run gradle --help
BUILD SUCCESSFUL
Total time: 5.263 secs
s@cft639:~/groovytest$ gradle -v
------------------------------------------------------------
Gradle 2.0-20140319132910+0000
------------------------------------------------------------
Build time:
2014-03-19 13:29:10 UTC
Build number: none
Revision:
f8e103a0d0d2a8a888fb20e18777e96f06a5f86f
Groovy:
1.8.9
Ant:
Apache Ant(TM) version 1.9.3 compiled on December 23 2013
Ivy:
2.2.0
JVM:
1.8.0 (Oracle Corporation 25.0-b70)
OS:
Linux 3.5.0-17-generic amd64
The test script is working ok after updating to groovy-all-1.8.9.jar in the Gradle distribution.
What do you think about upgrading the Groovy version to 1.8.9?
Thank you, Stefan