Skip to content

Instantly share code, notes, and snippets.

@gschueler
Created March 29, 2014 23:57
Show Gist options
  • Save gschueler/9865032 to your computer and use it in GitHub Desktop.
Save gschueler/9865032 to your computer and use it in GitHub Desktop.
Aggregating javadocs for a gradle multiproject build
//ref: <http://issues.gradle.org/browse/GRADLE-1876>
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")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment