use of org.gradle.api.internal.tasks.compile.DefaultJavaCompileSpecFactory 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;
}
Aggregations