The new @Builder annotation in Groovy 2.3.0 will occur compilation error if build with Gradle(both 1.11 and 1.12).

However, I can generate the .class file with groovyc in Groovy 2.3.0, this below is the error log:

E:\dev\content\test-ws\ii-13-groovy230-test\hello-groovy230-gradle\src\main\groovy\ClassA.groovy: 8: Can't load builderStrategy 'groovy.transform.builder.DefaultStrategy' java.lang.ClassCastException: groovy.transform.builder.DefaultStrategy cannot be cast to org.codehaus.groovy.transform.BuilderASTTransformation$BuilderStrategy
@ line 8, column 1.
@Builder
^

And this is my build.gradle as below:
apply plugin: 'groovy'

repositories {
mavenLocal()
mavenCentral()
}

dependencies {
compile 'org.codehaus.groovy:groovy-all:2.3.0'
}

Thanks
1 person has
this question
+1
Reply