if (groovyOptions.isFork()) {
daemonFactory = compilerDaemonFactory;
} else {
daemonFactory = inProcessCompilerDaemonFactory;
}
groovyCompiler = new DaemonGroovyCompiler(project.getRootProject().getProjectDir(), groovyCompiler, project.getServices().get(ClassPathRegistry.class), daemonFactory);
return new NormalizingGroovyCompiler(groovyCompiler);
}