use of org.gradle.api.tasks.compile.ForkOptions in project gradle by gradle.
the class CommandLineJavaCompiler method execute.
@Override
public WorkResult execute(JavaCompileSpec spec) {
final ForkOptions forkOptions = spec.getCompileOptions().getForkOptions();
String executable = forkOptions.getJavaHome() != null ? Jvm.forHome(forkOptions.getJavaHome()).getJavacExecutable().getAbsolutePath() : getExecutable(forkOptions);
LOGGER.info("Compiling with Java command line compiler '{}'.", executable);
ExecHandle handle = createCompilerHandle(executable, spec);
executeCompiler(handle);
return new SimpleWorkResult(true);
}
Aggregations