I need to generate some javadoc for a project that contains 3 modules, and I only need specific files from each module.
In Android Studio I can go Tools -> Generate JavaDoc and then set custom scope, and selectively choose the files I want and it aggregates them into a single javadoc folder, but this won't work for our automated build.
I can't figure out how to do this on the gradle command line?
Every example is some variation of this task
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath+=project.files(android.getBootClasspath().join(File.pathSeparator))
destinationDir = file("../javadoc/")
failOnError false
}
This generates the javadoc for the entire module. I can't figure out how to get only the files I want?
It looks like you can do it the following way
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
destinationDir = file("../javadoc/")
include("**/ClassFile1.java")
include("**/ClassFile2.java")
failOnError false
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With