use of org.gradle.workers.internal.InProcessWorkerFactory in project gradle by gradle.
the class GroovyCompilerFactory method newCompiler.
@Override
public Compiler<GroovyJavaJointCompileSpec> newCompiler(GroovyJavaJointCompileSpec spec) {
GroovyCompileOptions groovyOptions = spec.getGroovyCompileOptions();
Compiler<JavaCompileSpec> javaCompiler = javaCompilerFactory.createForJointCompilation(spec.getClass());
Compiler<GroovyJavaJointCompileSpec> groovyCompiler = new ApiGroovyCompiler(javaCompiler);
WorkerFactory workerFactory;
if (groovyOptions.isFork()) {
workerFactory = workerDaemonFactory;
} else {
workerFactory = inProcessWorkerFactory;
}
groovyCompiler = new DaemonGroovyCompiler(project.getRootProject().getProjectDir(), groovyCompiler, project.getServices().get(ClassPathRegistry.class), workerFactory);
return new NormalizingGroovyCompiler(groovyCompiler);
}
use of org.gradle.workers.internal.InProcessWorkerFactory in project gradle by gradle.
the class GroovyCompile method getCompiler.
private Compiler<GroovyJavaJointCompileSpec> getCompiler(GroovyJavaJointCompileSpec spec) {
if (compiler == null) {
ProjectInternal projectInternal = (ProjectInternal) getProject();
WorkerDaemonFactory workerDaemonFactory = getServices().get(WorkerDaemonFactory.class);
InProcessWorkerFactory inProcessWorkerFactory = getServices().get(InProcessWorkerFactory.class);
JavaCompilerFactory javaCompilerFactory = getServices().get(JavaCompilerFactory.class);
GroovyCompilerFactory groovyCompilerFactory = new GroovyCompilerFactory(projectInternal, javaCompilerFactory, workerDaemonFactory, inProcessWorkerFactory);
Compiler<GroovyJavaJointCompileSpec> delegatingCompiler = groovyCompilerFactory.newCompiler(spec);
compiler = new CleaningGroovyCompiler(delegatingCompiler, getOutputs());
}
return compiler;
}
Aggregations