use of org.gradle.workers.internal.FlatClassLoaderStructure in project gradle by gradle.
the class DaemonJavaCompiler method toDaemonForkOptions.
@Override
protected DaemonForkOptions toDaemonForkOptions(JavaCompileSpec spec) {
MinimalJavaCompilerDaemonForkOptions forkOptions = spec.getCompileOptions().getForkOptions();
JavaForkOptions javaForkOptions = new BaseForkOptionsConverter(forkOptionsFactory).transform(forkOptions);
javaForkOptions.setWorkingDir(daemonWorkingDir);
javaForkOptions.setExecutable(findSuitableExecutable(spec));
ClassPath compilerClasspath = classPathRegistry.getClassPath("JAVA-COMPILER");
FlatClassLoaderStructure classLoaderStructure = new FlatClassLoaderStructure(new VisitableURLClassLoader.Spec("compiler", compilerClasspath.getAsURLs()));
return new DaemonForkOptionsBuilder(forkOptionsFactory).javaForkOptions(javaForkOptions).withClassLoaderStructure(classLoaderStructure).keepAliveMode(KeepAliveMode.SESSION).build();
}
Aggregations