Search in sources :

Example 1 with ScalaForkOptions

use of org.gradle.api.tasks.scala.ScalaForkOptions in project gradle by gradle.

the class DaemonScalaCompiler method toInvocationContext.

@Override
protected InvocationContext toInvocationContext(T spec) {
    ForkOptions javaOptions = spec.getCompileOptions().getForkOptions();
    ScalaForkOptions scalaOptions = spec.getScalaCompileOptions().getForkOptions();
    JavaForkOptions javaForkOptions = new BaseForkOptionsConverter(fileResolver).transform(mergeForkOptions(javaOptions, scalaOptions));
    File invocationWorkingDir = javaForkOptions.getWorkingDir();
    javaForkOptions.setWorkingDir(daemonWorkingDir);
    DaemonForkOptions daemonForkOptions = new DaemonForkOptionsBuilder(fileResolver).javaForkOptions(javaForkOptions).classpath(zincClasspath).sharedPackages(SHARED_PACKAGES).keepAliveMode(KeepAliveMode.SESSION).build();
    return new InvocationContext(invocationWorkingDir, daemonForkOptions);
}
Also used : DaemonForkOptionsBuilder(org.gradle.workers.internal.DaemonForkOptionsBuilder) BaseForkOptionsConverter(org.gradle.api.internal.tasks.compile.BaseForkOptionsConverter) DaemonForkOptions(org.gradle.workers.internal.DaemonForkOptions) ScalaForkOptions(org.gradle.api.tasks.scala.ScalaForkOptions) ForkOptions(org.gradle.api.tasks.compile.ForkOptions) DaemonForkOptions(org.gradle.workers.internal.DaemonForkOptions) JavaForkOptions(org.gradle.process.JavaForkOptions) ScalaForkOptions(org.gradle.api.tasks.scala.ScalaForkOptions) JavaForkOptions(org.gradle.process.JavaForkOptions) File(java.io.File)

Aggregations

File (java.io.File)1 BaseForkOptionsConverter (org.gradle.api.internal.tasks.compile.BaseForkOptionsConverter)1 ForkOptions (org.gradle.api.tasks.compile.ForkOptions)1 ScalaForkOptions (org.gradle.api.tasks.scala.ScalaForkOptions)1 JavaForkOptions (org.gradle.process.JavaForkOptions)1 DaemonForkOptions (org.gradle.workers.internal.DaemonForkOptions)1 DaemonForkOptionsBuilder (org.gradle.workers.internal.DaemonForkOptionsBuilder)1