Skip to content

Commit 999fa12

Browse files
committed
Deprecate support for Gradle 2.7 and earlier
1 parent 943a054 commit 999fa12

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ diverge from the defaults.
3939
By default, Spring Boot {spring-boot-version} requires http://www.java.com[Java 7] and
4040
Spring Framework {spring-version} or above. You can use Spring Boot with Java 6 with some
4141
additional configuration. See <<howto.adoc#howto-use-java-6>> for more details. Explicit
42-
build support is provided for Maven (3.2+) and Gradle (1.12 or 2.x). Gradle 3 is not
43-
supported.
42+
build support is provided for Maven (3.2+) and Gradle (1.12 or 2.x). Support for Gradle
43+
2.7 and earlier is deprecated. Gradle 3 is not supported.
4444

4545
TIP: Although you can use Spring Boot with Java 6 or 7, we generally recommend Java 8 if
4646
at all possible.
@@ -205,9 +205,9 @@ scope.
205205

206206
[[getting-started-gradle-installation]]
207207
==== Gradle installation
208-
Spring Boot is compatible with Gradle 1.12 or 2.x. 2.14.1 is recommended. Gradle 3 is not
209-
supported. If you don't already have Gradle installed you can follow the instructions at
210-
http://www.gradle.org/.
208+
Spring Boot is compatible with Gradle 1.12 or 2.x but support for 2.7 and earlier is
209+
deprecated. Gradle 2.14.1 is recommended. Gradle 3 is not supported. If you don't already
210+
have Gradle installed you can follow the instructions at http://www.gradle.org/.
211211

212212
Spring Boot dependencies can be declared using the `org.springframework.boot` `group`.
213213
Typically your project will declare dependencies to one or more

spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/SpringBootPlugin.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
import org.gradle.api.Task;
2323
import org.gradle.api.plugins.JavaPlugin;
2424
import org.gradle.api.tasks.compile.JavaCompile;
25+
import org.gradle.util.GradleVersion;
26+
import org.slf4j.Logger;
27+
import org.slf4j.LoggerFactory;
2528

2629
import org.springframework.boot.gradle.SpringBootPluginExtension;
2730
import org.springframework.boot.gradle.agent.AgentPluginFeatures;
@@ -38,8 +41,15 @@
3841
*/
3942
public class SpringBootPlugin implements Plugin<Project> {
4043

44+
private static final Logger logger = LoggerFactory.getLogger(SpringBootPlugin.class);
45+
4146
@Override
4247
public void apply(Project project) {
48+
if (GradleVersion.current().compareTo(GradleVersion.version("2.8")) < 0) {
49+
logger.warn("Spring Boot plugin's support for Gradle "
50+
+ GradleVersion.current().getVersion()
51+
+ " is deprecated. Please upgrade to Gradle 2.8 or later.");
52+
}
4353
project.getExtensions().create("springBoot", SpringBootPluginExtension.class,
4454
project);
4555
project.getPlugins().apply(JavaPlugin.class);

0 commit comments

Comments
 (0)