The currect 1.2-groovy-2.5 uses Groovy 2.5.2.
Without overriding the Groovy version to 2.5.3 it will not work on JDK 11.
See https://issues.apache.org/jira/browse/GROOVY-8727
This makes it difficult for first-time Spock users on JDK 11 just adding the Spock dependency.
Spock 1.2-groovy-2.5 + Groovy 2.5.3 + Java 11 is broken. Looks like we need to wait for the resolution of this https://github.com/spockframework/spock/pull/900 to fix the situation.
testCompile("org.codehaus.groovy:groovy-all:2.4.15")
testCompile("org.spockframework:spock-core:1.1-groovy-2.4")
seems works with Java 11 + Gradle 4.8
testCompile("org.codehaus.groovy:groovy-all:2.4.15") testCompile("org.spockframework:spock-core:1.1-groovy-2.4")seems works with Java 11 + Gradle 4.8
Not for me :(
@vanta such combination seems to work for me, but using maven
@ArturSkowronski I was able to workaround it using hack described here: https://github.com/spockframework/spock/issues/948 (limit number of digits in long variable).
I managed to fix my build with Gradle 5.0-rc-2 and the following manual Groovy overrides:
testCompile 'org.spockframework:spock-core:1.2-groovy-2.5'
testCompile 'org.codehaus.groovy:groovy:2.5.4'
testCompile 'org.codehaus.groovy:groovy-json:2.5.4'
testCompile 'org.codehaus.groovy:groovy-macro:2.5.4'
testCompile 'org.codehaus.groovy:groovy-nio:2.5.4'
testCompile 'org.codehaus.groovy:groovy-sql:2.5.4'
testCompile 'org.codehaus.groovy:groovy-templates:2.5.4'
testCompile 'org.codehaus.groovy:groovy-test:2.5.4'
testCompile 'org.codehaus.groovy:groovy-xml:2.5.4'
Fixed with #900
Most helpful comment
seems works with Java 11 + Gradle 4.8