I'm getting this exception at runtime, I've replaced the actual class name with com.foo.Bar
java.lang.AbstractMethodError: Receiver class com.foo.Bar does not define or inherit an implementation of the resolved method 'abstract void setProperty(java.lang.String, java.lang.Object)' of interface groovy.lang.GroovyObject.
This is a groovy project, and I'm pretty sure there is something wrong with Gradle. As I get this exception when I moved a class from one module to another. There is the only change I made, and it worked before when it was in the other module, but in the class path as implementation project(":foobar").
I have a structure in my project like:
/build.gradle
/app/build.gradle
/util/build.gradle
And I moved the class from util to app. These build.gradle files both have the same groovy version in their classpath with the same groovy plugin.
I am stumped.
Edit After doing some digging I thought I might check what the difference is between the compiler produces and they differ significantly!!
The working version has more annotations:
@Generated
public Object call(Object args) {
return this.doCall(args);
}
@Generated
public Object call() {
return this.doCall((Object)null);
}
Also has this stuff at the bottom:
Working
@Generated
@Internal
@Transient
public MetaClass getMetaClass() {
MetaClass var10000 = this.metaClass;
if (var10000 != null) {
return var10000;
} else {
this.metaClass = this.$getStaticMetaClass();
return this.metaClass;
}
}
@Generated
@Internal
public void setMetaClass(MetaClass var1) {
this.metaClass = var1;
}