Commit 979fa12c authored by Phillip Webb's avatar Phillip Webb

Polish source type for Gradle snippets

parent 57e54af6
......@@ -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'
......
......@@ -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)
----
......
......@@ -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()
......
......@@ -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"
......
......@@ -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"
......
......@@ -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') {
......
......@@ -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'
......
......@@ -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)
......
......@@ -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 {
// …
......
......@@ -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 ->
......
......@@ -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")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment