Android Studio - Gradle creates specific javadoc files

I need to create javadoc for a project that contains 3 modules, and I only need specific files from each module.

In Android Studio, I can run Tools -> Generate JavaDoc, and then set up a custom area and selectively select the files I want and merge them into one javadoc folder, but this will not work for our automatic build.

I can't figure out how to do this on the gradle command line?

In each example, several options for this task are given.

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 javadoc for the entire module. I can’t figure out how to get only the files I want?

+6
source share
1 answer

It looks like you can do it like this

 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 } 
+2
source

All Articles