Skip to content

Commit f40d986

Browse files
committed
Revise configuration for javadoc Gradle tasks
Closes gh-34766
1 parent 9c13c6b commit f40d986

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

Diff for: framework-api/framework-api.gradle

+3-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ javadoc {
3131
destinationDir = project.java.docsDir.dir("javadoc-api").get().asFile
3232
splitIndex = true
3333
links(rootProject.ext.javadocLinks)
34-
addBooleanOption('Xdoclint:syntax,reference', true) // only check syntax and reference with doclint
35-
addBooleanOption('Werror', true) // fail build on Javadoc warnings
34+
// Check for 'syntax' and 'reference' during linting.
35+
addBooleanOption('Xdoclint:syntax,reference', true)
36+
addBooleanOption('Werror', true) // fail build on Javadoc warnings
3637
}
3738
maxMemory = "1024m"
3839
doFirst {

Diff for: gradle/spring-module.gradle

+13-15
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,19 @@ normalization {
7070
javadoc {
7171
description = "Generates project-level javadoc for use in -javadoc jar"
7272

73-
options.encoding = "UTF-8"
74-
options.memberLevel = JavadocMemberLevel.PROTECTED
75-
options.author = true
76-
options.header = project.name
77-
options.use = true
78-
options.links(project.ext.javadocLinks)
79-
// Check for syntax during linting. 'none' doesn't seem to work in suppressing
80-
// all linting warnings all the time (see/link references most notably).
81-
options.addStringOption("Xdoclint:syntax", "-quiet")
82-
83-
// Suppress warnings due to cross-module @see and @link references.
84-
// Note that global 'api' task does display all warnings, and
85-
// checks for 'reference' on top of 'syntax'.
86-
logging.captureStandardError LogLevel.INFO
87-
logging.captureStandardOutput LogLevel.INFO // suppress "## warnings" message
73+
options {
74+
encoding = "UTF-8"
75+
memberLevel = JavadocMemberLevel.PROTECTED
76+
author = true
77+
header = project.name
78+
use = true
79+
links(project.ext.javadocLinks)
80+
// Check for 'syntax' during linting. Note that the global
81+
// 'framework-api:javadoc' task checks for 'reference' in addition
82+
// to 'syntax'.
83+
addBooleanOption("Xdoclint:syntax,-reference", true)
84+
addBooleanOption('Werror', true) // fail build on Javadoc warnings
85+
}
8886
}
8987

9088
tasks.register('sourcesJar', Jar) {

0 commit comments

Comments
 (0)