Search in sources :

Example 1 with CleaningGroovyCompiler

use of org.gradle.api.internal.tasks.compile.CleaningGroovyCompiler in project gradle by gradle.

the class GroovyCompile method getCompiler.

private Compiler<GroovyJavaJointCompileSpec> getCompiler(GroovyJavaJointCompileSpec spec) {
    if (compiler == null) {
        ProjectInternal projectInternal = (ProjectInternal) getProject();
        WorkerDaemonFactory workerDaemonFactory = getServices().get(WorkerDaemonFactory.class);
        IsolatedClassloaderWorkerFactory inProcessWorkerFactory = getServices().get(IsolatedClassloaderWorkerFactory.class);
        FileResolver fileResolver = getServices().get(FileResolver.class);
        GroovyCompilerFactory groovyCompilerFactory = new GroovyCompilerFactory(projectInternal, workerDaemonFactory, inProcessWorkerFactory, fileResolver);
        Compiler<GroovyJavaJointCompileSpec> delegatingCompiler = groovyCompilerFactory.newCompiler(spec);
        compiler = new CleaningGroovyCompiler(delegatingCompiler, getOutputs());
    }
    return compiler;
}
Also used : GroovyCompilerFactory(org.gradle.api.internal.tasks.compile.GroovyCompilerFactory) IsolatedClassloaderWorkerFactory(org.gradle.workers.internal.IsolatedClassloaderWorkerFactory) ProjectInternal(org.gradle.api.internal.project.ProjectInternal) GroovyJavaJointCompileSpec(org.gradle.api.internal.tasks.compile.GroovyJavaJointCompileSpec) DefaultGroovyJavaJointCompileSpec(org.gradle.api.internal.tasks.compile.DefaultGroovyJavaJointCompileSpec) CleaningGroovyCompiler(org.gradle.api.internal.tasks.compile.CleaningGroovyCompiler) FileResolver(org.gradle.api.internal.file.FileResolver) WorkerDaemonFactory(org.gradle.workers.internal.WorkerDaemonFactory)

Aggregations

FileResolver (org.gradle.api.internal.file.FileResolver)1 ProjectInternal (org.gradle.api.internal.project.ProjectInternal)1 CleaningGroovyCompiler (org.gradle.api.internal.tasks.compile.CleaningGroovyCompiler)1 DefaultGroovyJavaJointCompileSpec (org.gradle.api.internal.tasks.compile.DefaultGroovyJavaJointCompileSpec)1 GroovyCompilerFactory (org.gradle.api.internal.tasks.compile.GroovyCompilerFactory)1 GroovyJavaJointCompileSpec (org.gradle.api.internal.tasks.compile.GroovyJavaJointCompileSpec)1 IsolatedClassloaderWorkerFactory (org.gradle.workers.internal.IsolatedClassloaderWorkerFactory)1 WorkerDaemonFactory (org.gradle.workers.internal.WorkerDaemonFactory)1