use of org.gradle.api.tasks.javadoc.Groovydoc in project gradle by gradle.
the class GroovyBasePlugin method configureGroovydoc.
private void configureGroovydoc() {
project.getTasks().withType(Groovydoc.class).configureEach(groovydoc -> {
groovydoc.getConventionMapping().map("groovyClasspath", () -> {
FileCollection groovyClasspath = groovyRuntime.inferGroovyClasspath(groovydoc.getClasspath());
// Jansi is required to log errors when generating Groovydoc
ConfigurableFileCollection jansi = project.getObjects().fileCollection().from(moduleRegistry.getExternalModule("jansi").getImplementationClasspath().getAsFiles());
return groovyClasspath.plus(jansi);
});
groovydoc.getConventionMapping().map("destinationDir", () -> javaPluginExtension().getDocsDir().dir("groovydoc").get().getAsFile());
groovydoc.getConventionMapping().map("docTitle", () -> projectExtension(ReportingExtension.class).getApiDocTitle());
groovydoc.getConventionMapping().map("windowTitle", () -> projectExtension(ReportingExtension.class).getApiDocTitle());
});
}
Aggregations