// the class. This makes it possible for a debugger to find the source file for the class. By default
// Groovy will only put the filename into the class, but that does not help a debugger for Gradle
// because it does not know where Gradle scripts might live.
@Override
protected groovyjarjarasm.asm.ClassVisitor createClassVisitor() {
return new ClassWriter(ClassWriter.COMPUTE_MAXS) {
// ignore the sourcePath that is given by Groovy (this is only the filename) and instead
// insert the full path if our script source has a source file
@Override
public void visitSource(String sourcePath, String debugInfo) {
super.visitSource(source.getFileName(), debugInfo);