Search in sources :

Example 1 with ScalaCompilerFactory

use of org.gradle.api.internal.tasks.scala.ScalaCompilerFactory 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)

Aggregations

ProjectInternal (org.gradle.api.internal.project.ProjectInternal)1 ScalaCompilerFactory (org.gradle.api.internal.tasks.scala.ScalaCompilerFactory)1 WorkerDaemonFactory (org.gradle.workers.internal.WorkerDaemonFactory)1