use of org.gradle.api.internal.tasks.CurrentJvmJavaToolChain in project gradle by gradle.
the class JavaCompile method getToolChain.
/**
* Returns the tool chain that will be used to compile the Java source.
*
* @return The tool chain.
*/
@Nested
@Incubating
public JavaToolChain getToolChain() {
if (getOptions().isFork()) {
ForkOptions forkOptions = getOptions().getForkOptions();
File javaHome = forkOptions.getJavaHome();
if (javaHome != null) {
return new JavaHomeBasedJavaToolChain(javaHome, getJavaCompilerFactory(), getExecActionFactory(), getJvmVersionDetector());
}
}
return new CurrentJvmJavaToolChain(getJavaCompilerFactory(), getExecActionFactory());
}
Aggregations