Looking at the first compile error, AnnotatedNode.getAnnotations() returns a
raw List in 1.6, but a List<AnnotationNode> in trunk. So it seems as if the
Gradle build were split into two parts (org.spockframework.* and groovy.*),
and the latter part would pull org.spockframework.* from a 1.6 Jar. Or maybe
classes found on the compile classpath have preference over classes to be
compiled (in the case of a name clash)?
Another indication for this is that when I do "gradle clean libs", I get
errors like:
/swd/src/groovy/trunk/src/main/groovy/lang/GroovyClassLoader.java:462:
groovy.lang.GroovyClassLoader.ClassCollector is not abstract and does not
override abstract method
call(groovyjarjarasm.asm.ClassVisitor,org.codehaus.groovy.ast.ClassNode) in
org.codehaus.groovy.control.CompilationUnit.ClassgenCallback
public static class ClassCollector extends
CompilationUnit.ClassgenCallback {
This means that the compiler sees a version of
org.codehaus.groovy.control.CompilationUnit.ClassGenCallBack that has
already been JarJared.
Not sure if it's the cause of all trouble, but the following line in
build.gradle looks suspicious to me:
dependencies {
groovy ( 'org.codehaus.groovy:groovy-all:1.6.3' )
[...]
}
Cheers,
Peter
Russel Winder-4 wrote:
>
> I retried the Gradle build for Groovy. The Ant build works fine but the
> Gradle build is giving me the following problem. Hopefully there is
> something wrong with the build.gradle, anyone got a chance to take a
> look?
>
> |> gradle compile
> :init
> :processResources
> :compile
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
> failed, Compile error during compilation with javac.
> /home/users/russel/Repositories/Bazaar/Subversion/GroovyCore/Trunk/src/main/groovy/beans/BindableASTTransformation.java:70:
> incompatible types
> found : java.lang.Object
> required: org.codehaus.groovy.ast.AnnotationNode
> for (AnnotationNode annotation : node.getAnnotations()) {
> ^
> /home/users/russel/Repositories/Bazaar/Subversion/GroovyCore/Trunk/src/main/groovy/beans/BindableASTTransformation.java:119:
> incompatible types
> found : java.lang.Object
> required: org.codehaus.groovy.ast.PropertyNode
> for (PropertyNode propertyNode : declaringClass.getProperties()) {
> ^
> /home/users/russel/Repositories/Bazaar/Subversion/GroovyCore/Trunk/src/main/groovy/beans/BindableASTTransformation.java:151:
> incompatible types
> found : java.lang.Object
> required: org.codehaus.groovy.ast.PropertyNode
> for (PropertyNode propertyNode : classNode.getProperties()) {
> ^
> /home/users/russel/Repositories/Bazaar/Subversion/GroovyCore/Trunk/src/main/groovy/beans/VetoableASTTransformation.java:70:
> incompatible types
> found : java.lang.Object
> required: org.codehaus.groovy.ast.AnnotationNode
> for (AnnotationNode annotation : node.getAnnotations()) {
> ^
> /home/users/russel/Repositories/Bazaar/Subversion/GroovyCore/Trunk/src/main/groovy/beans/VetoableASTTransformation.java:110:
> incompatible types
> found : java.lang.Object
> required: org.codehaus.groovy.ast.PropertyNode
> for (PropertyNode propertyNode : declaringClass.getProperties()) {
> ^
> /home/users/russel/Repositories/Bazaar/Subversion/GroovyCore/Trunk/src/main/groovy/beans/VetoableASTTransformation.java:141:
> incompatible types
> found : java.lang.Object
> required: org.codehaus.groovy.ast.PropertyNode
> for (PropertyNode propertyNode : classNode.getProperties()) {
> ^
> /home/users/russel/Repositories/Bazaar/Subversion/GroovyCore/Trunk/src/main/groovy/grape/GrabAnnotationTransformation.java:71:
> incompatible types
> found : java.lang.Object
> required: org.codehaus.groovy.ast.ImportNode
> for (ImportNode im : mn.getImports()) {
> ^
> /home/users/russel/Repositories/Bazaar/Subversion/GroovyCore/Trunk/src/main/groovy/grape/GrabAnnotationTransformation.java:92:
> incompatible types
> found : java.lang.Object
> required: org.codehaus.groovy.ast.ClassNode
> for (ClassNode classNode : sourceUnit.getAST().getClasses()) {
> ^
> /home/users/russel/Repositories/Bazaar/Subversion/GroovyCore/Trunk/src/main/groovy/grape/GrabAnnotationTransformation.java:205:
> incompatible types
> found : java.lang.Object
> required: org.codehaus.groovy.ast.AnnotationNode
> for (AnnotationNode an : node.getAnnotations()) {
> ^
> /home/users/russel/Repositories/Bazaar/Subversion/GroovyCore/Trunk/src/main/groovy/lang/MetaClassImpl.java:2546:
> <anonymous groovy.lang.MetaClassImpl$12> is not abstract and does not
> override abstract method
> call(groovyjarjarasm.asm.ClassVisitor,org.codehaus.groovy.ast.ClassNode)
> in org.codehaus.groovy.control.CompilationUnit.ClassgenCallback
> CompilationUnit.ClassgenCallback search = new
> CompilationUnit.ClassgenCallback() {
>
>
> ^
> /home/users/russel/Repositories/Bazaar/Subversion/GroovyCore/Trunk/src/main/groovy/lang/GroovyClassLoader.java:462:
> groovy.lang.GroovyClassLoader.ClassCollector is not abstract and does not
> override abstract method
> call(groovyjarjarasm.asm.ClassVisitor,org.codehaus.groovy.ast.ClassNode)
> in org.codehaus.groovy.control.CompilationUnit.ClassgenCallback
> public static class ClassCollector extends
> CompilationUnit.ClassgenCallback {
> ^
> Note: Some input files use unchecked or unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.
> 11 errors
>
>
> 1 error
>
>
> Build failed with an exception.
> Run with -s or -d option to get more details. Run with -f option to get
> the full (very verbose) stacktrace.
>
> Build file
> '/home/users/russel/Repositories/Bazaar/Subversion/GroovyCore/Trunk/build.gradle'
>
> Execution failed for task ':compile'.
> Cause: Forked groovyc returned error code: 1
>
> BUILD FAILED
>
> Total time: 21.059 secs
>
> --
> Russel.
> =============================================================================
> Dr Russel Winder Partner
> xmpp: [email protected]
> Concertant LLP t: +44 20 7585 2200, +44 20 7193 9203
> 41 Buckmaster Road, f: +44 8700 516 084 voip:
> sip:[email protected]
> London SW11 1EN, UK m: +44 7770 465 077 skype: russel_winder
>
>
>
--
View this message in context:
http://www.nabble.com/Gradle-build-for-Groovy-tp23795578p23799025.html
Sent from the gradle-user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email