Creating Javadoc documentation
To generate a Javadoc documentation, we must use the javadoc
task of the org.gradle.api.tasks.javadoc.Javadoc
type. The task generates a documentation for the Java source files in the main
source set. If we want to generate documentation for the source sets in our project, we must configure the javadoc
task or add an extra javadoc
task to our project.
Note that, in our project, we have an API and main source set with the Java source files. If we want to generate documentation for both the source sets, we have to configure the javadoc
task in our project. The source
property of the javadoc
task is set to sourceSets.main.allJava
by default. If we add sourceSets.api.allJava
to the source
property, our interface file ...
Get Gradle Effective Implementations Guide - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.