use of org.gradle.api.tasks.compile.BaseForkOptions in project gradle by gradle.
the class DaemonPlayCompiler method toInvocationContext.
@Override
protected InvocationContext toInvocationContext(PlayCompileSpec spec) {
BaseForkOptions forkOptions = spec.getForkOptions();
JavaForkOptions javaForkOptions = new BaseForkOptionsConverter(fileResolver).transform(forkOptions);
File invocationWorkingDir = javaForkOptions.getWorkingDir();
javaForkOptions.setWorkingDir(daemonWorkingDir);
DaemonForkOptions daemonForkOptions = new DaemonForkOptionsBuilder(fileResolver).javaForkOptions(javaForkOptions).classpath(compilerClasspath).sharedPackages(classLoaderPackages).keepAliveMode(KeepAliveMode.SESSION).build();
return new InvocationContext(invocationWorkingDir, daemonForkOptions);
}
use of org.gradle.api.tasks.compile.BaseForkOptions in project gradle by gradle.
the class AbstractDaemonCompiler method mergeForkOptions.
protected BaseForkOptions mergeForkOptions(BaseForkOptions left, BaseForkOptions right) {
BaseForkOptions merged = new BaseForkOptions();
merged.setMemoryInitialSize(mergeHeapSize(left.getMemoryInitialSize(), right.getMemoryInitialSize()));
merged.setMemoryMaximumSize(mergeHeapSize(left.getMemoryMaximumSize(), right.getMemoryMaximumSize()));
Set<String> mergedJvmArgs = normalized(left.getJvmArgs());
mergedJvmArgs.addAll(normalized(right.getJvmArgs()));
merged.setJvmArgs(Lists.newArrayList(mergedJvmArgs));
return merged;
}
Aggregations