Skip to content

Commit 28a887a

Browse files
committed
Raise minimum supported version of Gradle
Closes gh-41180
1 parent 63c6b1e commit 28a887a

File tree

9 files changed

+5
-114
lines changed

9 files changed

+5
-114
lines changed

buildSrc/src/main/java/org/springframework/boot/build/MavenPublishingConventions.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,6 @@ private void customizePom(MavenPom pom, Project project) {
102102

103103
private void customizeJavaMavenPublication(MavenPublication publication, Project project) {
104104
addMavenOptionalFeature(publication, project);
105-
if (publication.getName().equals("pluginMaven")) {
106-
return;
107-
}
108105
publication.versionMapping((strategy) -> strategy.usage(Usage.JAVA_API, (mappingStrategy) -> mappingStrategy
109106
.fromResolutionOf(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME)));
110107
publication.versionMapping(

spring-boot-project/spring-boot-docs/src/docs/antora/modules/ROOT/pages/installing.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ More details on getting started with Spring Boot and Maven can be found in the x
4949
[[getting-started.installing.java.gradle]]
5050
=== Gradle Installation
5151

52-
Spring Boot is compatible with Gradle 7.x (7.5 or later) and 8.x.
52+
Spring Boot is compatible with Gradle 7.x (7.6.4 or later) or 8.x (8.3 or later).
5353
If you do not already have Gradle installed, you can follow the instructions at https://gradle.org.
5454

5555
Spring Boot dependencies can be declared by using the `org.springframework.boot` `group`.

spring-boot-project/spring-boot-docs/src/docs/antora/modules/ROOT/pages/system-requirements.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Explicit build support is provided for the following build tools:
1313
| 3.6.3 or later
1414

1515
| Gradle
16-
| 7.x (7.5 or later) and 8.x
16+
| Gradle 7.x (7.6.4 or later) or 8.x (8.3 or later)
1717
|===
1818

1919

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/build.gradle

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,6 @@ plugins {
66

77
description = "Spring Boot Buildpack Platform"
88

9-
configurations.all {
10-
resolutionStrategy {
11-
eachDependency { dependency ->
12-
// Downgrade Jackson as Gradle cannot cope with 2.15.0's multi-version
13-
// jar files with bytecode in META-INF/versions/19
14-
if (dependency.requested.group.startsWith("com.fasterxml.jackson")) {
15-
dependency.useVersion("2.14.2")
16-
}
17-
// Downgrade Spring Framework as Gradle cannot cope with 6.1.0-M1's
18-
// multi-version jar files with bytecode in META-INF/versions/21
19-
if (dependency.requested.group.equals("org.springframework")) {
20-
dependency.useVersion("$springFramework60xVersion")
21-
}
22-
}
23-
}
24-
}
25-
269
dependencies {
2710
api("com.fasterxml.jackson.core:jackson-databind")
2811
api("com.fasterxml.jackson.module:jackson-module-parameter-names")

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/build.gradle

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -15,53 +15,6 @@ configurations {
1515
// Downgrade SLF4J is required for tests to run in Eclipse
1616
resolutionStrategy.force("org.slf4j:slf4j-api:1.7.36")
1717
}
18-
modernGradleRuntimeClasspath {
19-
extendsFrom runtimeClasspath
20-
canBeConsumed = false
21-
canBeResolved = true
22-
}
23-
modernGradleRuntimeElements {
24-
extendsFrom configurations.implementation, configurations.runtimeOnly
25-
canBeConsumed = true
26-
canBeResolved = false
27-
attributes {
28-
attribute(Category.CATEGORY_ATTRIBUTE, project.objects.named(Category, Category.LIBRARY))
29-
attribute(Bundling.BUNDLING_ATTRIBUTE, project.objects.named(Bundling, Bundling.EXTERNAL))
30-
attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 17)
31-
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, project.objects.named(LibraryElements, LibraryElements.JAR))
32-
attribute(Usage.USAGE_ATTRIBUTE, project.objects.named(Usage, Usage.JAVA_RUNTIME))
33-
attribute(GradlePluginApiVersion.GRADLE_PLUGIN_API_VERSION_ATTRIBUTE, project.objects.named(GradlePluginApiVersion, "8.7"))
34-
}
35-
outgoing.artifacts.addAll(configurations.runtimeElements.outgoing.artifacts)
36-
}
37-
runtimeElements {
38-
attributes {
39-
attribute(GradlePluginApiVersion.GRADLE_PLUGIN_API_VERSION_ATTRIBUTE, project.objects.named(GradlePluginApiVersion, "7.5"))
40-
}
41-
}
42-
all { configuration ->
43-
if (configuration.name == 'modernGradleRuntimeClasspath') {
44-
return
45-
}
46-
resolutionStrategy {
47-
eachDependency { dependency ->
48-
// Downgrade Jackson as Gradle cannot cope with 2.15.0's multi-version
49-
// jar files with bytecode in META-INF/versions/19
50-
if (dependency.requested.group.startsWith("com.fasterxml.jackson")) {
51-
dependency.useVersion("2.14.2")
52-
}
53-
// Downgrade Spring Framework as Gradle cannot cope with 6.1.0-M1's
54-
// multi-version jar files with bytecode in META-INF/versions/21
55-
if (dependency.requested.group.equals("org.springframework")) {
56-
dependency.useVersion("$springFramework60xVersion")
57-
}
58-
}
59-
}
60-
}
61-
}
62-
63-
components.java.addVariantsFromConfiguration(configurations.modernGradleRuntimeElements) {
64-
mapToMavenScope("runtime")
6518
}
6619

6720
dependencies {
@@ -178,18 +131,3 @@ artifacts {
178131
toolchain {
179132
maximumCompatibleJavaVersion = JavaLanguageVersion.of(20)
180133
}
181-
182-
publishing {
183-
publications.matching { it.name == 'pluginMaven' }.configureEach {
184-
versionMapping {
185-
allVariants {
186-
fromResolutionOf(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME)
187-
}
188-
}
189-
versionMapping {
190-
variant(GradlePluginApiVersion.GRADLE_PLUGIN_API_VERSION_ATTRIBUTE, project.objects.named(GradlePluginApiVersion, "8.7")) {
191-
fromResolutionOf("modernGradleRuntimeClasspath")
192-
}
193-
}
194-
}
195-
}

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/antora/modules/gradle-plugin/pages/introduction.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
The Spring Boot Gradle Plugin provides Spring Boot support in https://gradle.org[Gradle].
55
It allows you to package executable jar or war archives, run Spring Boot applications, and use the dependency management provided by `spring-boot-dependencies`.
6-
Spring Boot's Gradle plugin requires Gradle 7.x (7.5 or later) or 8.x and can be used with Gradle's {url-gradle-docs}/configuration_cache.html[configuration cache].
6+
Spring Boot's Gradle plugin requires Gradle 7.x (7.6.4 or later) or 8.x (8.3 or later) and can be used with Gradle's {url-gradle-docs}/configuration_cache.html[configuration cache].
77

88
In addition to this user guide, xref:api/java/index.html[API documentation] is also available.

spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleVersions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ private GradleVersions() {
3535
@SuppressWarnings("UnstableApiUsage")
3636
public static List<String> allCompatible() {
3737
if (isJavaVersion(JavaVersion.VERSION_20)) {
38-
return Arrays.asList("8.1.1", "8.8");
38+
return Arrays.asList("8.3", "8.8");
3939
}
40-
return Arrays.asList("7.5.1", GradleVersion.current().getVersion(), "8.0.2", "8.8");
40+
return Arrays.asList(GradleVersion.current().getVersion(), "8.3", "8.8");
4141
}
4242

4343
public static String minimumCompatible() {

spring-boot-project/spring-boot-tools/spring-boot-loader-tools/build.gradle

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,6 @@ configurations {
2121
extendsFrom dependencyManagement
2222
transitive = false
2323
}
24-
all {
25-
resolutionStrategy {
26-
eachDependency { dependency ->
27-
// Downgrade Spring Framework as Gradle cannot cope with 6.1.0-M1's
28-
// multi-version jar files with bytecode in META-INF/versions/21
29-
if (dependency.requested.group.equals("org.springframework")) {
30-
dependency.useVersion("$springFramework60xVersion")
31-
}
32-
}
33-
}
34-
}
3524
}
3625

3726
dependencies {

spring-boot-system-tests/spring-boot-image-tests/build.gradle

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,6 @@ configurations {
1111
providedRuntime {
1212
extendsFrom dependencyManagement
1313
}
14-
all {
15-
resolutionStrategy {
16-
eachDependency { dependency ->
17-
// Downgrade Jackson as Gradle cannot cope with 2.15.0's multi-version
18-
// jar files with bytecode in META-INF/versions/19
19-
if (dependency.requested.group.startsWith("com.fasterxml.jackson")) {
20-
dependency.useVersion("2.14.2")
21-
}
22-
// Downgrade Spring Framework as Gradle cannot cope with 6.1.0-M1's
23-
// multi-version jar files with bytecode in META-INF/versions/21
24-
if (dependency.requested.group.equals("org.springframework")) {
25-
dependency.useVersion("$springFramework60xVersion")
26-
}
27-
}
28-
}
29-
}
3014
}
3115

3216
task syncMavenRepository(type: Sync) {

0 commit comments

Comments
 (0)