this.inProcessCompilerDaemonFactory = inProcessCompilerDaemonFactory;
}
public Compiler<GroovyJavaJointCompileSpec> newCompiler(GroovyJavaJointCompileSpec spec) {
CompileOptions javaOptions = spec.getCompileOptions();
GroovyCompileOptions groovyOptions = spec.getGroovyCompileOptions();
Compiler<JavaCompileSpec> javaCompiler = javaCompilerFactory.createForJointCompilation(javaOptions);
Compiler<GroovyJavaJointCompileSpec> groovyCompiler = new ApiGroovyCompiler(javaCompiler);
CompilerDaemonFactory daemonFactory;
if (groovyOptions.isFork()) {
daemonFactory = compilerDaemonFactory;
} else {
daemonFactory = inProcessCompilerDaemonFactory;
}
groovyCompiler = new DaemonGroovyCompiler(project.getRootProject().getProjectDir(), groovyCompiler, project.getServices().get(ClassPathRegistry.class), daemonFactory);