Search in sources :

Example 1 with WorkerDaemonFactory

use of org.gradle.workers.internal.WorkerDaemonFactory in project gradle by gradle.

the class ScalaCompile method getCompiler.

protected org.gradle.language.base.internal.compile.Compiler<ScalaJavaJointCompileSpec> getCompiler(ScalaJavaJointCompileSpec spec) {
    assertScalaClasspathIsNonEmpty();
    if (compiler == null) {
        ProjectInternal projectInternal = (ProjectInternal) getProject();
        WorkerDaemonFactory workerDaemonFactory = getServices().get(WorkerDaemonFactory.class);
        ScalaCompilerFactory scalaCompilerFactory = new ScalaCompilerFactory(projectInternal.getRootProject().getProjectDir(), workerDaemonFactory, getScalaClasspath(), getZincClasspath(), getProject().getGradle().getGradleUserHomeDir());
        compiler = scalaCompilerFactory.newCompiler(spec);
    }
    return compiler;
}
Also used : ProjectInternal(org.gradle.api.internal.project.ProjectInternal) ScalaCompilerFactory(org.gradle.api.internal.tasks.scala.ScalaCompilerFactory) WorkerDaemonFactory(org.gradle.workers.internal.WorkerDaemonFactory)

Example 2 with WorkerDaemonFactory

use of org.gradle.workers.internal.WorkerDaemonFactory 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;
}
Also used : InProcessWorkerFactory(org.gradle.workers.internal.InProcessWorkerFactory) GroovyCompilerFactory(org.gradle.api.internal.tasks.compile.GroovyCompilerFactory) ProjectInternal(org.gradle.api.internal.project.ProjectInternal) GroovyJavaJointCompileSpec(org.gradle.api.internal.tasks.compile.GroovyJavaJointCompileSpec) DefaultGroovyJavaJointCompileSpec(org.gradle.api.internal.tasks.compile.DefaultGroovyJavaJointCompileSpec) CleaningGroovyCompiler(org.gradle.api.internal.tasks.compile.CleaningGroovyCompiler) JavaCompilerFactory(org.gradle.api.internal.tasks.compile.JavaCompilerFactory) WorkerDaemonFactory(org.gradle.workers.internal.WorkerDaemonFactory)

Aggregations

ProjectInternal (org.gradle.api.internal.project.ProjectInternal)2 WorkerDaemonFactory (org.gradle.workers.internal.WorkerDaemonFactory)2 CleaningGroovyCompiler (org.gradle.api.internal.tasks.compile.CleaningGroovyCompiler)1 DefaultGroovyJavaJointCompileSpec (org.gradle.api.internal.tasks.compile.DefaultGroovyJavaJointCompileSpec)1 GroovyCompilerFactory (org.gradle.api.internal.tasks.compile.GroovyCompilerFactory)1 GroovyJavaJointCompileSpec (org.gradle.api.internal.tasks.compile.GroovyJavaJointCompileSpec)1 JavaCompilerFactory (org.gradle.api.internal.tasks.compile.JavaCompilerFactory)1 ScalaCompilerFactory (org.gradle.api.internal.tasks.scala.ScalaCompilerFactory)1 InProcessWorkerFactory (org.gradle.workers.internal.InProcessWorkerFactory)1