I use this to try to create an aggregate javavadoc of all subprojects, alongside the jar that combines all subproject jars (next up would be combined sources):
task javadocs(type: Javadoc) {
source subprojects.collect { project ->
project.sourceSets.main.allJava
}
println buildDir
destinationDir = new File(buildDir, 'javadoc')
}
This task fails with the error too many module declarations found
. Each of my subprojects has a separate module-info.java
that now get listed. What would be a workaround here?