Commit f35b91a1 authored by Andy Wilkinson's avatar Andy Wilkinson

Raise minimum supported version of Gradle to 4.10 and encourage use of 5.x

Closes gh-16681
parent 1f897ad9
......@@ -169,7 +169,8 @@ Advanced configuration options and examples are available in the
== Spring Boot Gradle Plugin
The Spring Boot Gradle Plugin provides Spring Boot support in Gradle, letting you package
executable jar or war archives, run Spring Boot applications, and use the dependency
management provided by `spring-boot-dependencies`. It requires Gradle 4.4 or later. Please
management provided by `spring-boot-dependencies`. It requires Gradle 5.x (4.10 is also
supported but this support is deprecated and will be removed in a future release). Please
refer to the plugin's documentation to learn more:
* Reference ({spring-boot-gradle-plugin}/reference/html[HTML] and
......
......@@ -52,7 +52,7 @@ Explicit build support is provided for the following build tools:
|3.3+
|Gradle
|4.4+
|5.x (4.10 is also supported but in a deprecated form)
|===
......@@ -201,8 +201,9 @@ scope.
[[getting-started-gradle-installation]]
==== Gradle Installation
Spring Boot is compatible with Gradle 4.4 and later. If you do not already have Gradle
installed, you can follow the instructions at https://gradle.org.
Spring Boot is compatible with 5.x. 4.10 is also supported but this support is deprecated
and will be removed in a future release. If you do not already have Gradle installed, you
can follow the instructions at https://gradle.org.
Spring Boot dependencies can be declared by using the `org.springframework.boot` `group`.
Typically, your project declares dependencies to one or more
......
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip
......@@ -19,18 +19,10 @@ include::../gradle/getting-started/apply-plugin-release.gradle.kts[]
----
endif::[]
ifeval::["{version-type}" == "MILESTONE"]
The plugin is published to the Spring milestones repository. For Gradle versions less
than 4.10, this means that you must apply the plugin imperatively:
[source,groovy,indent=0,subs="verbatim,attributes"]
----
include::../gradle/getting-started/apply-plugin-milestone.gradle[]
----
For Gradle 4.10 and above, Gradle can be configured to use the milestones repository
and it can be applied using the `plugins` block. To configure Gradle to use the milestones
repository, add the following to your `settings.gradle` (Groovy) or `settings.gradle.kts`
(Kotlin):
The plugin is published to the Spring milestones repository. Gradle can be configured to
use the milestones repository and the plugin can then be applied using the `plugins`
block. To configure Gradle to use the milestones repository, add the following to your
`settings.gradle` (Groovy) or `settings.gradle.kts` (Kotlin):
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
.Groovy
......@@ -59,18 +51,10 @@ include::../gradle/getting-started/apply-plugin-release.gradle.kts[]
----
endif::[]
ifeval::["{version-type}" == "SNAPSHOT"]
The plugin is published to the Spring snapshots repository. For Gradle versions less
than 4.10, this means that you must apply the plugin imperatively:
[source,groovy,indent=0,subs="verbatim,attributes"]
----
include::../gradle/getting-started/apply-plugin-milestone.gradle[]
----
For Gradle 4.10 and above, Gradle can be configured to use the snapshots repository
and it can be applied using the `plugins` block. To configure Gradle to use the snapshots
repository, add the following to your `settings.gradle` (Groovy) or `settings.gradle.kts`
(Kotlin):
The plugin is published to the Spring snapshots repository. Gradle can be configured to
use the snapshots repository and the plugin can then be applied using the `plugins`
block. To configure Gradle to use the snapshots repository, add the following to your
`settings.gradle` (Groovy) or `settings.gradle.kts` (Kotlin):
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
.Groovy
......
......@@ -39,8 +39,8 @@ Andy Wilkinson
The Spring Boot Gradle Plugin provides Spring Boot support in https://gradle.org[Gradle],
allowing you to package executable jar or war archives, run Spring Boot applications, and
use the dependency management provided by `spring-boot-dependencies`. Spring Boot's
Gradle plugin requires Gradle 4.4 or later. If you choose to use the newer Kotlin DSL,
it requires Gradle 4.10 or later.
Gradle plugin requires Gradle 5.x (4.10 is also supported but this support is deprecated
and will be removed in a future release).
In addition to this user guide, {api-documentation}[API documentation] is also available.
......
buildscript {
repositories {
maven { url 'https://repo.spring.io/libs-milestone' }
}
dependencies {
classpath 'org.springframework.boot:spring-boot-gradle-plugin:{version}'
}
}
apply plugin: 'org.springframework.boot'
/*
* Copyright 2012-2018 the original author or authors.
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -119,7 +119,6 @@ class BootZipCopyAction implements CopyAction {
return () -> true;
}
@SuppressWarnings("unchecked")
private Spec<FileTreeElement> createExclusionSpec(
Spec<FileTreeElement> loaderEntries) {
return Specs.union(loaderEntries, this.exclusions);
......
......@@ -38,9 +38,8 @@ import org.springframework.boot.gradle.testkit.GradleBuild;
*/
public final class GradleCompatibilitySuite extends Suite {
private static final List<String> GRADLE_VERSIONS = Arrays.asList("default", "4.5.1",
"4.6", "4.7", "4.8.1", "4.9", "4.10.3", "5.0", "5.1.1", "5.2.1", "5.3.1",
"5.4.1");
private static final List<String> GRADLE_VERSIONS = Arrays.asList("default", "5.0",
"5.1.1", "5.2.1", "5.3.1", "5.4.1");
public GradleCompatibilitySuite(Class<?> clazz) throws InitializationError {
super(clazz, createRunners(clazz));
......
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