use of org.gradle.api.internal.tasks.compile.DefaultJavaCompileSpec in project gradle by gradle.
the class JavaCompile method compile.
@TaskAction
protected void compile(IncrementalTaskInputs inputs) {
if (!compileOptions.isIncremental()) {
compile();
return;
}
DefaultJavaCompileSpec spec = createSpec();
CompileCaches compileCaches = createCompileCaches();
IncrementalCompilerFactory factory = new IncrementalCompilerFactory(getFileOperations(), getCachingFileHasher(), getPath(), createCompiler(spec), source, compileCaches, (IncrementalTaskInputsInternal) inputs, getEffectiveAnnotationProcessorPath());
Compiler<JavaCompileSpec> compiler = factory.createCompiler();
performCompilation(spec, compiler);
}
use of org.gradle.api.internal.tasks.compile.DefaultJavaCompileSpec in project gradle by gradle.
the class JavaCompile method createSpec.
@SuppressWarnings("deprecation")
private DefaultJavaCompileSpec createSpec() {
final DefaultJavaCompileSpec spec = new DefaultJavaCompileSpecFactory(compileOptions).create();
spec.setSource(getSource());
spec.setDestinationDir(getDestinationDir());
spec.setWorkingDir(getProject().getProjectDir());
spec.setTempDir(getTemporaryDir());
spec.setCompileClasspath(ImmutableList.copyOf(getClasspath()));
spec.setAnnotationProcessorPath(ImmutableList.copyOf(getEffectiveAnnotationProcessorPath()));
File dependencyCacheDir = DeprecationLogger.whileDisabled(new Factory<File>() {
@Override
@SuppressWarnings("deprecation")
public File create() {
return getDependencyCacheDir();
}
});
spec.setDependencyCacheDir(dependencyCacheDir);
spec.setTargetCompatibility(getTargetCompatibility());
spec.setSourceCompatibility(getSourceCompatibility());
spec.setCompileOptions(compileOptions);
return spec;
}
use of org.gradle.api.internal.tasks.compile.DefaultJavaCompileSpec in project gradle by gradle.
the class JavaCompile method compile.
@Override
protected void compile() {
DefaultJavaCompileSpec spec = createSpec();
performCompilation(spec, createCompiler(spec));
}
Aggregations