final GroovyClassLoader astTransformClassLoader = new GroovyClassLoader(groovyCompilerClassLoader, null);
// can't delegate to compileClasspathLoader because this would result in ASTTransformation interface
// (which is implemented by the transform class) being loaded by compileClasspathClassLoader (which is
// where the transform class is loaded from)
for (File file : spec.getClasspath()) {
astTransformClassLoader.addClasspath(file.getPath());
}
JavaAwareCompilationUnit unit = new JavaAwareCompilationUnit(configuration, compileClasspathClassLoader) {
@Override
public GroovyClassLoader getTransformLoader() {