From 979fa12ca920aea3da70a340246f9b0fbaee8f99 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 4 May 2021 10:35:39 -0700 Subject: [PATCH] Polish source type for Gradle snippets --- .../spring-boot-docs/src/docs/asciidoc/actuator/enabling.adoc | 2 +- .../asciidoc/configuration-metadata/annotation-processor.adoc | 4 ++-- .../src/docs/asciidoc/deployment/installing.adoc | 2 +- .../docs/asciidoc/features/developing-auto-configuration.adoc | 4 ++-- .../spring-boot-docs/src/docs/asciidoc/howto/build.adoc | 4 ++-- .../src/docs/asciidoc/howto/jedis-instead-of-lettuce.adoc | 2 +- .../spring-boot-docs/src/docs/asciidoc/howto/logging.adoc | 2 +- .../src/docs/asciidoc/howto/properties-and-configuration.adoc | 2 +- .../src/docs/asciidoc/howto/traditional-deployment.adoc | 4 ++-- .../spring-boot-docs/src/docs/asciidoc/howto/webserver.adoc | 2 +- .../spring-boot-docs/src/docs/asciidoc/using/devtools.adoc | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/enabling.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/enabling.adoc index f8162750f71..2e8db6f5d88 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/enabling.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/enabling.adoc @@ -23,7 +23,7 @@ To add the actuator to a Maven based project, add the following '`Starter`' depe For Gradle, use the following declaration: -[source,groovy,indent=0] +[source,gradle,indent=0] ---- dependencies { implementation 'org.springframework.boot:spring-boot-starter-actuator' 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 d18069ddb40..225b85f5432 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 @@ -22,7 +22,7 @@ With Maven the dependency should be declared as optional, as shown in the follow With Gradle, the dependency should be declared in the `annotationProcessor` configuration, as shown in the following example: -[source,groovy,indent=0,subs="verbatim,quotes,attributes"] +[source,gradle,indent=0,subs="verbatim,quotes,attributes"] ---- dependencies { annotationProcessor "org.springframework.boot:spring-boot-configuration-processor" @@ -31,7 +31,7 @@ With Gradle, the dependency should be declared in the `annotationProcessor` conf If you are using an `additional-spring-configuration-metadata.json` file, the `compileJava` task should be configured to depend on the `processResources` task, as shown in the following example: -[source,groovy,indent=0,subs="verbatim,quotes,attributes"] +[source,gradle,indent=0,subs="verbatim,quotes,attributes"] ---- compileJava.inputs.files(processResources) ---- 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 96fd61360c6..beef625c3c4 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 @@ -28,7 +28,7 @@ To create a '`fully executable`' jar with Maven, use the following plugin config The following example shows the equivalent Gradle configuration: -[source,groovy,indent=0,subs="verbatim,quotes,attributes"] +[source,gradle,indent=0,subs="verbatim,quotes,attributes"] ---- bootJar { launchScript() diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/developing-auto-configuration.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/developing-auto-configuration.adoc index a7278bd7960..f8e140cd961 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/developing-auto-configuration.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/developing-auto-configuration.adoc @@ -317,7 +317,7 @@ If you have defined auto-configurations directly in your application, make sure With Gradle 4.5 and earlier, the dependency should be declared in the `compileOnly` configuration, as shown in the following example: -[source,groovy,indent=0,subs="verbatim,quotes,attributes"] +[source,gradle,indent=0,subs="verbatim,quotes,attributes"] ---- dependencies { compileOnly "org.springframework.boot:spring-boot-autoconfigure-processor" @@ -326,7 +326,7 @@ With Gradle 4.5 and earlier, the dependency should be declared in the `compileOn With Gradle 4.6 and later, the dependency should be declared in the `annotationProcessor` configuration, as shown in the following example: -[source,groovy,indent=0,subs="verbatim,quotes,attributes"] +[source,gradle,indent=0,subs="verbatim,quotes,attributes"] ---- dependencies { annotationProcessor "org.springframework.boot:spring-boot-autoconfigure-processor" diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/build.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/build.adoc index ddb688b6023..be19adab48b 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/build.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/build.adoc @@ -37,7 +37,7 @@ TIP: See the {spring-boot-maven-plugin-docs}#goals-build-info[Spring Boot Maven The following example does the same with Gradle: -[source,groovy,indent=0,subs="verbatim,attributes"] +[source,gradle,indent=0,subs="verbatim,attributes"] ---- springBoot { buildInfo() @@ -69,7 +69,7 @@ To use it, add the following declaration to your POM: Gradle users can achieve the same result by using the https://plugins.gradle.org/plugin/com.gorylenko.gradle-git-properties[`gradle-git-properties`] plugin, as shown in the following example: -[source,groovy,indent=0] +[source,gradle,indent=0] ---- plugins { id "com.gorylenko.gradle-git-properties" version "2.2.4" diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/jedis-instead-of-lettuce.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/jedis-instead-of-lettuce.adoc index 87a30edb8cb..882b79bee4b 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/jedis-instead-of-lettuce.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/jedis-instead-of-lettuce.adoc @@ -26,7 +26,7 @@ The following example shows how to do so in Maven: The following example shows how to do so in Gradle: -[source,groovy,indent=0,subs="verbatim,quotes,attributes"] +[source,gradle,indent=0,subs="verbatim,quotes,attributes"] ---- dependencies { implementation('org.springframework.boot:spring-boot-starter-data-redis') { diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/logging.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/logging.adoc index 2e779616188..7efd4cb1524 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/logging.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/logging.adoc @@ -148,7 +148,7 @@ The following example shows how to set up the starters in Maven: And the following example shows one way to set up the starters in Gradle: -[source,groovy,indent=0,subs="verbatim,quotes,attributes"] +[source,gradle,indent=0,subs="verbatim,quotes,attributes"] ---- dependencies { compile 'org.springframework.boot:spring-boot-starter-web' 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 b9c3251b055..44d344c3a66 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 @@ -69,7 +69,7 @@ If that property is not set to `false`, these may be expanded by the build. ==== Automatic Property Expansion Using Gradle You can automatically expand properties from the Gradle project by configuring the Java plugin's `processResources` task to do so, as shown in the following example: -[source,groovy,indent=0] +[source,gradle,indent=0] ---- processResources { expand(project.properties) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/traditional-deployment.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/traditional-deployment.adoc index a481cbfd47c..f4e1ffcb0bc 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/traditional-deployment.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/traditional-deployment.adoc @@ -29,7 +29,7 @@ If you use Maven and `spring-boot-starter-parent` (which configures Maven's war If you use Gradle, you need to modify `build.gradle` to apply the war plugin to the project, as follows: -[source,groovy,indent=0,subs="verbatim,quotes,attributes"] +[source,gradle,indent=0,subs="verbatim,quotes,attributes"] ---- apply plugin: 'war' ---- @@ -54,7 +54,7 @@ If you use Maven, the following example marks the servlet container (Tomcat, in If you use Gradle, the following example marks the servlet container (Tomcat, in this case) as being provided: -[source,groovy,indent=0,subs="verbatim,quotes,attributes"] +[source,gradle,indent=0,subs="verbatim,quotes,attributes"] ---- dependencies { // … diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/webserver.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/webserver.adoc index 9cbf35d116f..3afbf547cfa 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/webserver.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/webserver.adoc @@ -46,7 +46,7 @@ If you wish to use Jetty 10, which does support Servlet 4.0, override the `jetty The following Gradle example shows how to use Undertow in place of Reactor Netty for Spring WebFlux: -[source,groovy,indent=0,subs="verbatim,quotes,attributes"] +[source,gradle,indent=0,subs="verbatim,quotes,attributes"] ---- configurations.all { resolutionStrategy.dependencySubstitution.all { dependency -> diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/using/devtools.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/using/devtools.adoc index 5b621ba5476..b8deb871b9f 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/using/devtools.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/using/devtools.adoc @@ -17,7 +17,7 @@ To include devtools support, add the module dependency to your build, as shown i ---- .Gradle -[source,groovy,indent=0,subs="attributes"] +[source,gradle,indent=0,subs="attributes"] ---- dependencies { developmentOnly("org.springframework.boot:spring-boot-devtools")