Switch javadoc link-modularity-mismatch flag to info

We now invoke the javadoc tool with "--link-modularity-mismatch info"
in order not to fail the build when encountering warnings such as the
following.

> The code being documented uses packages in the unnamed module, but the
> packages defined in https://junit.org/junit5/docs/5.12.2/api/ are in
> named modules.

Closes gh-27497
This commit is contained in:
Sam Brannen
2025-04-16 14:16:59 +02:00
parent 3057de7746
commit 39e263fe5d
2 changed files with 8 additions and 1 deletions

View File

@@ -33,7 +33,11 @@ javadoc {
links(rootProject.ext.javadocLinks)
// Check for 'syntax' and 'reference' during linting.
addBooleanOption('Xdoclint:syntax,reference', true)
addBooleanOption('Werror', true) // fail build on Javadoc warnings
// Change modularity mismatch from warn to info.
// See https://github.com/spring-projects/spring-framework/issues/27497
addStringOption("-link-modularity-mismatch", "info")
// Fail build on Javadoc warnings.
addBooleanOption('Werror', true)
}
maxMemory = "1024m"
doFirst {