I am building JavaDoc for an API wherein classes in the API depend on R.java. I want to build the Javadoc w/o symbol errors referencing the missing R.java file as even when I set failOnError false the build succeeds but our Jenkins job will report the build as Failed when errors occur in successful builds.
task generateDoclava(type: Javadoc){
...
exclude '**/R.java'
}
It seems the exclude
statement is excluding from the classpath and not the javadoc as when I leave the exclude statement in I get the symbol not found
errors and if I remove the exclude statement the errors go away and the files are included in the javadoc. If I add the generated path to the R.java files to the javadoc classpath the errors go away but the all the R.java classes get added to the javadoc w/o links so the exclude is not keeping the files being generated in the javadoc. Any insight into the correct pattern to exclude source files that are required to be on the javadoc classpath would be appreciated.
Note: I have posted to Stack Exchange in a bit more detail here.