Search in sources :

Example 1 with DefaultJavaCompileSpecFactory

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;
}
Also used : DefaultJavaCompileSpec(org.gradle.api.internal.tasks.compile.DefaultJavaCompileSpec) DefaultJavaCompileSpecFactory(org.gradle.api.internal.tasks.compile.DefaultJavaCompileSpecFactory) File(java.io.File)

Aggregations

File (java.io.File)1 DefaultJavaCompileSpec (org.gradle.api.internal.tasks.compile.DefaultJavaCompileSpec)1 DefaultJavaCompileSpecFactory (org.gradle.api.internal.tasks.compile.DefaultJavaCompileSpecFactory)1