Search in sources :

Example 1 with FlatClassLoaderStructure

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();
}
Also used : DaemonForkOptionsBuilder(org.gradle.workers.internal.DaemonForkOptionsBuilder) ClassPath(org.gradle.internal.classpath.ClassPath) FlatClassLoaderStructure(org.gradle.workers.internal.FlatClassLoaderStructure) VisitableURLClassLoader(org.gradle.internal.classloader.VisitableURLClassLoader) JavaForkOptions(org.gradle.process.JavaForkOptions)

Aggregations

VisitableURLClassLoader (org.gradle.internal.classloader.VisitableURLClassLoader)1 ClassPath (org.gradle.internal.classpath.ClassPath)1 JavaForkOptions (org.gradle.process.JavaForkOptions)1 DaemonForkOptionsBuilder (org.gradle.workers.internal.DaemonForkOptionsBuilder)1 FlatClassLoaderStructure (org.gradle.workers.internal.FlatClassLoaderStructure)1