CompilerFactory compilerFactory = new DefaultGroovyCompilerFactory(config);
TopCodeCacheFactory topCodeCacheFactory = new DefaultTopCodeCacheFactory(compilerFactory);
Engine engine = new LayeredEngine.Builder().setTopCodeCacheFactory(topCodeCacheFactory).build();
SourceFactory sourceFactory = new DefaultSourceFactory.Builder().setTrackUrlContent(true).build();
Set<Source> sourceSet = SourceUtil.urlsToSourceSet(sourceFactory, urls);
Sources sources = new FixedSetSources.Builder(sourceSet)
.setName("URL Sources")
.setCompilerFactory(compilerFactory)
.build();
return new Builder()
.setEngine(engine)