If you are following a standard project structure, use:
apply plugin: 'java'
javadoc {
source = sourceSets.main.allJava
classpath = configurations.compile
}
If not, you need to specify the inclusion close. Add a closure like this:
include 'path/to/directory/*'
If enabling closing does not work, add a closing sourceSet with srcDir pointing to the module / java directory:
sourceSets {
build {
java.srcDir file('src/main/java')
}
}
$gradle javadoc.
html , javadocs.
. srcDir .