use of org.gradle.process.internal.DefaultJavaForkOptions in project gradle by gradle.
the class DaemonForkOptionsBuilder method buildJavaForkOptions.
private ImmutableJavaForkOptions buildJavaForkOptions() {
JavaForkOptionsInternal delegate = new DefaultJavaForkOptions(fileResolver);
javaForkOptions.copyTo(delegate);
return new ImmutableJavaForkOptions(delegate);
}
use of org.gradle.process.internal.DefaultJavaForkOptions in project gradle by gradle.
the class DefaultWorkerExecutor method toDaemonOptions.
private DaemonForkOptions toDaemonOptions(Class<?> actionClass, Iterable<Class<?>> paramClasses, JavaForkOptions userForkOptions, Iterable<File> classpath) {
ImmutableSet.Builder<File> classpathBuilder = ImmutableSet.builder();
ImmutableSet.Builder<String> sharedPackagesBuilder = ImmutableSet.builder();
sharedPackagesBuilder.add("javax.inject");
if (classpath != null) {
classpathBuilder.addAll(classpath);
}
addVisibilityFor(actionClass, classpathBuilder, sharedPackagesBuilder, true);
for (Class<?> paramClass : paramClasses) {
addVisibilityFor(paramClass, classpathBuilder, sharedPackagesBuilder, false);
}
Iterable<File> daemonClasspath = classpathBuilder.build();
Iterable<String> daemonSharedPackages = sharedPackagesBuilder.build();
JavaForkOptions forkOptions = new DefaultJavaForkOptions(fileResolver);
userForkOptions.copyTo(forkOptions);
forkOptions.setWorkingDir(workerDirectoryProvider.getIdleWorkingDirectory());
return new DaemonForkOptionsBuilder(fileResolver).javaForkOptions(forkOptions).classpath(daemonClasspath).sharedPackages(daemonSharedPackages).keepAliveMode(KeepAliveMode.DAEMON).build();
}
Aggregations