Search in sources :

Example 1 with Groovydoc

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());
    });
}
Also used : ConfigurableFileCollection(org.gradle.api.file.ConfigurableFileCollection) ConfigurableFileCollection(org.gradle.api.file.ConfigurableFileCollection) FileCollection(org.gradle.api.file.FileCollection) Groovydoc(org.gradle.api.tasks.javadoc.Groovydoc)

Aggregations

ConfigurableFileCollection (org.gradle.api.file.ConfigurableFileCollection)1 FileCollection (org.gradle.api.file.FileCollection)1 Groovydoc (org.gradle.api.tasks.javadoc.Groovydoc)1