Search in sources :

Example 1 with DefaultGroovyJavaJointCompileSpecFactory

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

Aggregations

File (java.io.File)1 DefaultGroovyJavaJointCompileSpec (org.gradle.api.internal.tasks.compile.DefaultGroovyJavaJointCompileSpec)1 DefaultGroovyJavaJointCompileSpecFactory (org.gradle.api.internal.tasks.compile.DefaultGroovyJavaJointCompileSpecFactory)1