If a groovy class (Test.groovy) references a class (AnnotatedClass) which has an annotation (Annotation) with a value class (ValueClass), which is not on the classpath an NoClassDefFoundError is thrown.
This does happen during Compilation. This did not happen in Groovy 2.4.15.
The stacktrace is:
I think the class org.codehaus.groovy.ast.decompiled.Annotations should also ignore annotation nodes, if the values type is not resolvable. Like it is done if the annotation type itself is not resolvable, see line 43-46.
I have attached a simple sample to reproduce the issue.
1. Compile it with gradle build
2. Open the jar file annos/build/libs/annos.jar
3. Delete the classfile annos/ValueClass.class
4. Compile it with gradle :client:build
Now the exception is thrown.