From 99a83742499eb06587ac051c496b5f00c80af919 Mon Sep 17 00:00:00 2001 From: Lars Grefer Date: Sat, 26 Feb 2022 03:41:13 +0100 Subject: [PATCH] Use Gradle's configuration avoidance APIs in the reference docs See gh-30000 --- .../asciidoc/configuration-metadata/annotation-processor.adoc | 4 +++- .../src/docs/asciidoc/deployment/installing.adoc | 2 +- .../src/docs/asciidoc/howto/properties-and-configuration.adoc | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/configuration-metadata/annotation-processor.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/configuration-metadata/annotation-processor.adoc index 8637445613..6aa025bf73 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/configuration-metadata/annotation-processor.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/configuration-metadata/annotation-processor.adoc @@ -33,7 +33,9 @@ If you are using an `additional-spring-configuration-metadata.json` file, the `c [source,gradle,indent=0,subs="verbatim"] ---- - compileJava.inputs.files(processResources) + tasks.named('compileJava') { + inputs.files(tasks.named('processResources')) + } ---- This dependency ensures that the additional metadata is available when the annotation processor runs during compilation. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/deployment/installing.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/deployment/installing.adoc index 71931d050f..ce221ed4f9 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/deployment/installing.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/deployment/installing.adoc @@ -30,7 +30,7 @@ The following example shows the equivalent Gradle configuration: [source,gradle,indent=0,subs="verbatim"] ---- - bootJar { + tasks.named('bootJar') { launchScript() } ---- diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/properties-and-configuration.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/properties-and-configuration.adoc index 6090889e63..d05c5f8523 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/properties-and-configuration.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/properties-and-configuration.adoc @@ -71,7 +71,7 @@ You can automatically expand properties from the Gradle project by configuring t [source,gradle,indent=0,subs="verbatim"] ---- - processResources { + tasks.named('processResources') { expand(project.properties) } ----