Browse Source

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
pull/34769/head
Sam Brannen 8 months ago
parent
commit
39e263fe5d
  1. 6
      framework-api/framework-api.gradle
  2. 3
      gradle/spring-module.gradle

6
framework-api/framework-api.gradle

@ -33,7 +33,11 @@ javadoc {
links(rootProject.ext.javadocLinks) links(rootProject.ext.javadocLinks)
// Check for 'syntax' and 'reference' during linting. // Check for 'syntax' and 'reference' during linting.
addBooleanOption('Xdoclint:syntax,reference', true) 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" maxMemory = "1024m"
doFirst { doFirst {

3
gradle/spring-module.gradle

@ -82,6 +82,9 @@ javadoc {
// 'framework-api:javadoc' task checks for 'reference' in addition // 'framework-api:javadoc' task checks for 'reference' in addition
// to 'syntax'. // to 'syntax'.
addBooleanOption("Xdoclint:syntax,-reference", true) addBooleanOption("Xdoclint:syntax,-reference", true)
// Change modularity mismatch from warn to info.
// See https://github.com/spring-projects/spring-framework/issues/27497
addStringOption("-link-modularity-mismatch", "info")
// With the javadoc tool on Java 24, it appears that the 'reference' // With the javadoc tool on Java 24, it appears that the 'reference'
// group is always active and the '-reference' flag is not honored. // group is always active and the '-reference' flag is not honored.
// Thus, we do NOT fail the build on Javadoc warnings due to // Thus, we do NOT fail the build on Javadoc warnings due to

Loading…
Cancel
Save