Skip to content

Commit 903a4a4

Browse files
committed
Fix configuration property references in the reference docs
Previously, the configprop macro was being used in the source but the extension that implements the macro was not available to Asciidoctor. This led to the references not being checked at build time and the macro being left as-is in the rendered documentation. This commit updates the dependencies that are available to Asciidoctor to include the extension and the projects which define the configuration properties referenced in the documentation. Closes gh-20149
1 parent 8577a39 commit 903a4a4

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

spring-boot-project/spring-boot-docs/build.gradle

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,32 @@ plugins {
88

99
configurations {
1010
actuatorApiDocumentation
11+
asciidoctorExtensions
1112
autoConfiguration
1213
configurationProperties
1314
gradlePluginDocumentation
1415
mavenPluginDocumentation
1516
testSlices
1617
}
1718

19+
repositories {
20+
maven {
21+
url "https://repo.spring.io/release"
22+
mavenContent {
23+
includeGroup "io.spring.asciidoctor"
24+
}
25+
}
26+
}
27+
1828
dependencies {
1929
actuatorApiDocumentation(project(path: ":spring-boot-project:spring-boot-actuator-autoconfigure", configuration: "documentation"))
2030

31+
asciidoctorExtensions(platform(project(":spring-boot-project:spring-boot-parent")))
32+
asciidoctorExtensions("io.spring.asciidoctor:spring-asciidoctor-extensions-spring-boot")
33+
asciidoctorExtensions(project(path: ":spring-boot-project:spring-boot-actuator-autoconfigure"))
34+
asciidoctorExtensions(project(path: ":spring-boot-project:spring-boot-autoconfigure"))
35+
asciidoctorExtensions(project(path: ":spring-boot-project:spring-boot-devtools"))
36+
2137
autoConfiguration(project(path: ":spring-boot-project:spring-boot-autoconfigure", configuration: "autoConfigurationMetadata"))
2238
autoConfiguration(project(path: ":spring-boot-project:spring-boot-actuator-autoconfigure", configuration: "autoConfigurationMetadata"))
2339
autoConfiguration(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "autoConfigurationMetadata"))
@@ -111,7 +127,11 @@ task documentConfigurationProperties(type: org.springframework.boot.build.contex
111127

112128
tasks.withType(org.asciidoctor.gradle.jvm.AbstractAsciidoctorTask) {
113129
dependsOn dependencyVersions
130+
configurations "asciidoctorExtensions"
114131
baseDirFollowsSourceDir()
132+
asciidoctorj {
133+
fatalWarnings = ['^((?!successfully validated).)*$']
134+
}
115135
doFirst {
116136
def versionConstraints = dependencyVersions.versionConstraints
117137
attributes "jetty-version": versionConstraints["org.eclipse.jetty:jetty-server"],

0 commit comments

Comments
 (0)