GroovyShell groovy = new GroovyShell(classLoader, new Binding(), configuration);
try {
String scriptName = determineScriptName(task);
parseAndRunScript(task, groovy, scriptName, txt, null);
} finally {
groovy.resetLoadedClasses();
groovy.getClassLoader().clearCache();
if (task.contextClassLoader) {
thread.setContextClassLoader(savedLoader);
}
}