Aggregate Javadoc in multiproject Gradle builds
Here's a brief solution for how to use Gradle to generate all javadoc for a multiproject java build.
Add this to your top-level build.gradle:
apply plugin 'java'
def exportedProjects= [
":top-lib",
":sub:sub-api",
":sub:sub-lib1",
":sub:sub-lib2",
":sub:sub-lib3"
]
task alljavadoc(type: Javadoc) {
source exportedProjects.collect { project(it).sourceSets.main.allJava }
classpath = files(exportedProjects.collect { project(it).sourceSets.main.compileClasspath })
destinationDir = file("${buildDir}/docs/javadoc")
}
Then run:
gradle alljavadoc
Written by Greg Schueler
Related protips
1 Response
Recently I addes the lines to my gradle.build but it doesnt work
Im using classpath 'com.android.tools.build:gradle:1.2.3'
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#