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
This commit is contained in:
Andy Wilkinson 2020-02-13 09:39:42 +00:00
parent 8577a39a96
commit 903a4a48e8

View File

@ -8,6 +8,7 @@ plugins {
configurations {
actuatorApiDocumentation
asciidoctorExtensions
autoConfiguration
configurationProperties
gradlePluginDocumentation
@ -15,9 +16,24 @@ configurations {
testSlices
}
repositories {
maven {
url "https://repo.spring.io/release"
mavenContent {
includeGroup "io.spring.asciidoctor"
}
}
}
dependencies {
actuatorApiDocumentation(project(path: ":spring-boot-project:spring-boot-actuator-autoconfigure", configuration: "documentation"))
asciidoctorExtensions(platform(project(":spring-boot-project:spring-boot-parent")))
asciidoctorExtensions("io.spring.asciidoctor:spring-asciidoctor-extensions-spring-boot")
asciidoctorExtensions(project(path: ":spring-boot-project:spring-boot-actuator-autoconfigure"))
asciidoctorExtensions(project(path: ":spring-boot-project:spring-boot-autoconfigure"))
asciidoctorExtensions(project(path: ":spring-boot-project:spring-boot-devtools"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-autoconfigure", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-actuator-autoconfigure", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "autoConfigurationMetadata"))
@ -111,7 +127,11 @@ task documentConfigurationProperties(type: org.springframework.boot.build.contex
tasks.withType(org.asciidoctor.gradle.jvm.AbstractAsciidoctorTask) {
dependsOn dependencyVersions
configurations "asciidoctorExtensions"
baseDirFollowsSourceDir()
asciidoctorj {
fatalWarnings = ['^((?!successfully validated).)*$']
}
doFirst {
def versionConstraints = dependencyVersions.versionConstraints
attributes "jetty-version": versionConstraints["org.eclipse.jetty:jetty-server"],