use of org.gradle.api.internal.tasks.compile.DefaultGroovyJavaJointCompileSpecFactory in project gradle by gradle.
the class GroovyCompile method createSpec.
private DefaultGroovyJavaJointCompileSpec createSpec() {
DefaultGroovyJavaJointCompileSpec spec = new DefaultGroovyJavaJointCompileSpecFactory(compileOptions).create();
spec.setSource(getSource());
spec.setDestinationDir(getDestinationDir());
spec.setWorkingDir(getProject().getProjectDir());
spec.setTempDir(getTemporaryDir());
spec.setCompileClasspath(ImmutableList.copyOf(getClasspath()));
spec.setSourceCompatibility(getSourceCompatibility());
spec.setTargetCompatibility(getTargetCompatibility());
spec.setAnnotationProcessorPath(calculateAnnotationProcessorClasspath());
spec.setGroovyClasspath(Lists.newArrayList(getGroovyClasspath()));
spec.setCompileOptions(compileOptions);
spec.setGroovyCompileOptions(groovyCompileOptions);
if (spec.getGroovyCompileOptions().getStubDir() == null) {
File dir = new File(getTemporaryDir(), "groovy-java-stubs");
GFileUtils.mkdirs(dir);
spec.getGroovyCompileOptions().setStubDir(dir);
}
return spec;
}
Aggregations