options.write(optionsFile);
} catch (IOException e) {
throw new GradleException("Faild to store javadoc options.", e);
}
ExecAction execAction = new DefaultExecAction();
execAction.workingDir(execDirectory);
execAction.executable(GUtil.elvis(executable, Jvm.current().getJavadocExecutable()));
execAction.args("@" + optionsFile.getAbsolutePath());
options.contributeCommandLineOptions(execAction);
return execAction;
}