Enable javadoc lint only for files that contains javadoc comments, avoid warning for missing javadoc comments on everything else

(cherry picked from commit d176e608bd)
This commit is contained in:
andsel 2020-12-16 10:19:23 +01:00 committed by J.A.R.V.I.S. - an Elastic git bot
parent 7704bc78d0
commit 05ec149b39

View file

@ -59,7 +59,13 @@ allprojects {
}
tasks.withType(Javadoc).configureEach {
options.addStringOption("Xwerror", "-quiet")
if (JavaVersion.current().compareTo(JavaVersion.VERSION_14) > 0) {
// with JDK 15 the -Xwerror undocumented feature becomes official with switch -Werror
options.addBooleanOption("Werror", true)
} else {
options.addBooleanOption("Xwerror", true)
}
options.addBooleanOption("Xdoclint:all,-missing", true)
if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_9) > 0) {
options.addBooleanOption("html5", true)
}