void (File configScript, CompilerConfiguration configuration, PrintStream err) { Binding binding = new Binding(); binding.setVariable("configuration", configuration); CompilerConfiguration configuratorConfig = new CompilerConfiguration(); ImportCustomizer customizer = new ImportCustomizer(); customizer.addStaticStars("org.codehaus.groovy.control.customizers.builder.CompilerCustomizationBuilder"); configuratorConfig.addCompilationCustomizers(customizer); try { new GroovyShell(binding, configuratorConfig).evaluate(configScript); } catch (Exception e) { e.printStackTrace(err); } }