Skip to content

Commit f35b91a

Browse files
committed
Raise minimum supported version of Gradle to 4.10 and encourage use of 5.x
Closes gh-16681
1 parent 1f897ad commit f35b91a

File tree

9 files changed

+20
-47
lines changed

9 files changed

+20
-47
lines changed

spring-boot-project/spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ Advanced configuration options and examples are available in the
169169
== Spring Boot Gradle Plugin
170170
The Spring Boot Gradle Plugin provides Spring Boot support in Gradle, letting you package
171171
executable jar or war archives, run Spring Boot applications, and use the dependency
172-
management provided by `spring-boot-dependencies`. It requires Gradle 4.4 or later. Please
172+
management provided by `spring-boot-dependencies`. It requires Gradle 5.x (4.10 is also
173+
supported but this support is deprecated and will be removed in a future release). Please
173174
refer to the plugin's documentation to learn more:
174175

175176
* Reference ({spring-boot-gradle-plugin}/reference/html[HTML] and

spring-boot-project/spring-boot-docs/src/main/asciidoc/getting-started.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Explicit build support is provided for the following build tools:
5252
|3.3+
5353

5454
|Gradle
55-
|4.4+
55+
|5.x (4.10 is also supported but in a deprecated form)
5656
|===
5757

5858

@@ -201,8 +201,9 @@ scope.
201201

202202
[[getting-started-gradle-installation]]
203203
==== Gradle Installation
204-
Spring Boot is compatible with Gradle 4.4 and later. If you do not already have Gradle
205-
installed, you can follow the instructions at https://gradle.org.
204+
Spring Boot is compatible with 5.x. 4.10 is also supported but this support is deprecated
205+
and will be removed in a future release. If you do not already have Gradle installed, you
206+
can follow the instructions at https://gradle.org.
206207

207208
Spring Boot dependencies can be declared by using the `org.springframework.boot` `group`.
208209
Typically, your project declares dependencies to one or more
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
34
zipStoreBase=GRADLE_USER_HOME
45
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/getting-started.adoc

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,10 @@ include::../gradle/getting-started/apply-plugin-release.gradle.kts[]
1919
----
2020
endif::[]
2121
ifeval::["{version-type}" == "MILESTONE"]
22-
The plugin is published to the Spring milestones repository. For Gradle versions less
23-
than 4.10, this means that you must apply the plugin imperatively:
24-
25-
[source,groovy,indent=0,subs="verbatim,attributes"]
26-
----
27-
include::../gradle/getting-started/apply-plugin-milestone.gradle[]
28-
----
29-
30-
For Gradle 4.10 and above, Gradle can be configured to use the milestones repository
31-
and it can be applied using the `plugins` block. To configure Gradle to use the milestones
32-
repository, add the following to your `settings.gradle` (Groovy) or `settings.gradle.kts`
33-
(Kotlin):
22+
The plugin is published to the Spring milestones repository. Gradle can be configured to
23+
use the milestones repository and the plugin can then be applied using the `plugins`
24+
block. To configure Gradle to use the milestones repository, add the following to your
25+
`settings.gradle` (Groovy) or `settings.gradle.kts` (Kotlin):
3426

3527
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
3628
.Groovy
@@ -59,18 +51,10 @@ include::../gradle/getting-started/apply-plugin-release.gradle.kts[]
5951
----
6052
endif::[]
6153
ifeval::["{version-type}" == "SNAPSHOT"]
62-
The plugin is published to the Spring snapshots repository. For Gradle versions less
63-
than 4.10, this means that you must apply the plugin imperatively:
64-
65-
[source,groovy,indent=0,subs="verbatim,attributes"]
66-
----
67-
include::../gradle/getting-started/apply-plugin-milestone.gradle[]
68-
----
69-
70-
For Gradle 4.10 and above, Gradle can be configured to use the snapshots repository
71-
and it can be applied using the `plugins` block. To configure Gradle to use the snapshots
72-
repository, add the following to your `settings.gradle` (Groovy) or `settings.gradle.kts`
73-
(Kotlin):
54+
The plugin is published to the Spring snapshots repository. Gradle can be configured to
55+
use the snapshots repository and the plugin can then be applied using the `plugins`
56+
block. To configure Gradle to use the snapshots repository, add the following to your
57+
`settings.gradle` (Groovy) or `settings.gradle.kts` (Kotlin):
7458

7559
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
7660
.Groovy

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/index.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ Andy Wilkinson
3939
The Spring Boot Gradle Plugin provides Spring Boot support in https://gradle.org[Gradle],
4040
allowing you to package executable jar or war archives, run Spring Boot applications, and
4141
use the dependency management provided by `spring-boot-dependencies`. Spring Boot's
42-
Gradle plugin requires Gradle 4.4 or later. If you choose to use the newer Kotlin DSL,
43-
it requires Gradle 4.10 or later.
42+
Gradle plugin requires Gradle 5.x (4.10 is also supported but this support is deprecated
43+
and will be removed in a future release).
4444

4545
In addition to this user guide, {api-documentation}[API documentation] is also available.
4646

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/getting-started/apply-plugin-milestone.gradle

Lines changed: 0 additions & 11 deletions
This file was deleted.

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootZipCopyAction.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -119,7 +119,6 @@ public WorkResult execute(CopyActionProcessingStream stream) {
119119
return () -> true;
120120
}
121121

122-
@SuppressWarnings("unchecked")
123122
private Spec<FileTreeElement> createExclusionSpec(
124123
Spec<FileTreeElement> loaderEntries) {
125124
return Specs.union(loaderEntries, this.exclusions);

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/junit/GradleCompatibilitySuite.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@
3838
*/
3939
public final class GradleCompatibilitySuite extends Suite {
4040

41-
private static final List<String> GRADLE_VERSIONS = Arrays.asList("default", "4.5.1",
42-
"4.6", "4.7", "4.8.1", "4.9", "4.10.3", "5.0", "5.1.1", "5.2.1", "5.3.1",
43-
"5.4.1");
41+
private static final List<String> GRADLE_VERSIONS = Arrays.asList("default", "5.0",
42+
"5.1.1", "5.2.1", "5.3.1", "5.4.1");
4443

4544
public GradleCompatibilitySuite(Class<?> clazz) throws InitializationError {
4645
super(clazz, createRunners(clazz));

0 commit comments

Comments
 (0)