Test initializationError(info.solidsoft.gradle.pitest.PitestPluginSpockTest) FAILED: org.spockframework.util.IncompatibleGroovyVersionException: The Spock JUnit runner cannot execute because Spock 0.7.0-groovy-2.0 is not compatible with Groovy 1.8.6. For more information, see http://versioninfo.spockframework.org
Spock location: file:/home/foo/.gradle/caches/artifacts-13/filestore/org.spockframework/spock-core/0.7-groovy-2.0-SNAPSHOT/jar/ca755d85f147f148392d9ebecc99eb86adcaa994/spock-core-0.7-groovy-2.0-SNAPSHOT.jar
Groovy location: file:/opt/gradle-1.0/lib/groovy-all-1.8.6.jar
From a debug log there is still groovy-all-1.8.6.jar on an application classpath (log by DefaultWorkerProcessFactory) before groovy-all-2.0.0.jar which is placed later.
‘gradleApi’ drags in the Groovy version that ships with Gradle, which is currently 1.8.6. Because ‘gradleApi’ is a special kind of dependency, there is no version conflict resolution as it would normally occur. When writing a Gradle plugin, you should use ‘groovy localGroovy()’, which again is 1.8.6 for recent versions of Gradle. You can’t currently use Groovy 2.0 for writing plugins.
Well actually I am not building a Gradle plugin, I am trying to build a Groovy 2.0 app (jar) and it fails with the following error:
Execution failed for task ‘:compileGroovy’. > BUG! exception in phase ‘class generation’ in source unit ‘/test/src/main/groovy/HelloWorld.groovy’ ClassNode#getTypeClass for org.slf4j.Logger is called before the type class is set
The strange thing is that it work with Groovy 1.8.6
Please create a new topic. Sounds like a problem with Groovy’s @Slf4j transform. Can you compile this with ‘compileGroovy.groovyOptions.useAnt = true’ or plain ‘groovyc’?