We are using gradle to build javadoc of our project. (Among other things.)
The sources generated by aidl seems to contain javadoc errors, so we tried to exclude them with '**/aidl/**" exclusion. Unfortunately the warnings still remain in the output, which causes build failure.
Shouldn’t those warnings be suppressed by adding the relevant exclude?
An example path would be something like: “./lib/aeroDroid/build/generated/source/aidl/debug/aero/glass/backgroundservice/aidl/IRemote.java”
As per your suggestion, I have tried excluding '/aidl/*’ instead of "/aidl/**" but the warnings were still present. Which is unfortunate, I was really hoping that you will be right, and it’s just that simple.
Sorry, yes. The mistake was only when copying the exclude here. The full line we tried is:
excludes = [’/aidl/*’, '/aero/glass/**’]
we added the ‘/aero/glass/’ part so we can verify that the exclude is picked up. And as we expected all the aero.glass.* classes are missing from the generated javadoc, but the aidl warnings are still present.
What we were thinking: Is it possible that somehow the exclusion filter application happens before the aidl file generation? Or that’s not likely?
I tried your code. Thank you very much for your suggestion. I substituted the line “source subprojectsWithJavadoc.javadoc.source” in the above code with your suggestion. Is that where I should have put this?
What went wrong:
No signature of method: java.util.ArrayList.matching() is applicable for argument types: (AeroGlassAggregateJavadocPlugin$_apply_closure1_closure3_closure4) values: [AeroGlassAggregateJavadocPlugin$_apply_closure1_closure3_closure4@60c69660]
Sorry… I think I skimmed through the javadoc aggregation implementation and didn’t fully understand how it worked.
Looking at it again it looks like you configure a task named “javadoc” in one or more subprojects. Then you have a task named “aggregateJavadocs” in the root project which generates javadoc for all of the subprojects. Correct?
If you want to avoid warnings in the subtasks, you’ll need to specify an exclude for **/aidl/** in each of the subprojects.
This can either be done in each subproject’s “javadoc” task declaration or can be done once in the root project via a subprojects { ... } closure