Skip to content

Commit

Permalink
Fix configuration property references in the reference docs
Browse files Browse the repository at this point in the history
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 spring-projectsgh-20149
  • Loading branch information
wilkinsona committed Feb 13, 2020
1 parent 8577a39 commit 903a4a4
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions spring-boot-project/spring-boot-docs/build.gradle
Expand Up @@ -8,16 +8,32 @@ plugins {

configurations {
actuatorApiDocumentation
asciidoctorExtensions
autoConfiguration
configurationProperties
gradlePluginDocumentation
mavenPluginDocumentation
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"))
Expand Down Expand Up @@ -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"],
Expand Down

0 comments on commit 903a4a4

Please sign in to comment.