Path configFile = new DefaultFileSystemBinding(baseDir).file(LaunchConfigs.CONFIG_RESOURCE_DEFAULT);
LaunchConfig launchConfig = LaunchConfigs.createFromFile(closure.getClass().getClassLoader(), baseDir, configFile, properties, defaultProperties);
if (scriptFile == null) {
launchConfig = new DelegatingLaunchConfig(launchConfig) {
@Override
public HandlerFactory getHandlerFactory() {
return new GroovyClosureHandlerFactory(closure);
}
};