ScriptCompiler compiler = scriptCompilerFactory.createCompiler(withImports);
compiler.setClassloader(classLoaderProvider.getClassLoader());
BuildScriptClasspathScriptTransformer classpathScriptTransformer
= new BuildScriptClasspathScriptTransformer(classpathClosureName);
compiler.setTransformer(classpathScriptTransformer);
ScriptRunner<? extends BasicScript> classPathScriptRunner = compiler.compile(scriptType);
classPathScriptRunner.getScript().init(target, services);
classPathScriptRunner.run();