Raise the minimum supported version of Gradle to 7.4
Closes gh-29674
This commit is contained in:
@@ -2,6 +2,6 @@
|
||||
= Introduction
|
||||
The Spring Boot Gradle Plugin provides Spring Boot support in https://gradle.org[Gradle].
|
||||
It allows 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 7.x (7.3 or later) and can be used with Gradle's {gradle-userguide}/configuration_cache.html[configuration cache].
|
||||
Spring Boot's Gradle plugin requires Gradle 7.x (7.4 or later) and can be used with Gradle's {gradle-userguide}/configuration_cache.html[configuration cache].
|
||||
|
||||
In addition to this user guide, {api-documentation}[API documentation] is also available.
|
||||
|
||||
@@ -131,6 +131,7 @@ final class JavaPluginAction implements PluginApplicationAction {
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void configureArtifactPublication(TaskProvider<BootJar> bootJar) {
|
||||
LazyPublishArtifact artifact = new LazyPublishArtifact(bootJar);
|
||||
this.singlePublishedArtifact.addCandidate(artifact);
|
||||
|
||||
@@ -106,6 +106,7 @@ class WarPluginAction implements PluginApplicationAction {
|
||||
.configure((buildImage) -> buildImage.getArchiveFile().set(bootWar.get().getArchiveFile()));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void configureArtifactPublication(TaskProvider<BootWar> bootWar) {
|
||||
LazyPublishArtifact artifact = new LazyPublishArtifact(bootWar);
|
||||
this.singlePublishedArtifact.addCandidate(artifact);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2020 the original author or authors.
|
||||
* Copyright 2012-2022 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.
|
||||
@@ -66,14 +66,6 @@ public class BuildInfoProperties implements Serializable {
|
||||
}
|
||||
|
||||
private Provider<String> projectVersion(Project project) {
|
||||
try {
|
||||
Provider<String> externalVersionProperty = project.getProviders().gradleProperty("version")
|
||||
.forUseAtConfigurationTime();
|
||||
externalVersionProperty.getOrNull();
|
||||
}
|
||||
catch (NoSuchMethodError ex) {
|
||||
// Gradle < 6.5
|
||||
}
|
||||
return project.provider(() -> project.getVersion().toString());
|
||||
}
|
||||
|
||||
|
||||
@@ -39,10 +39,10 @@ class SpringBootPluginIntegrationTests {
|
||||
|
||||
@DisabledForJreRange(min = JRE.JAVA_14)
|
||||
@Test
|
||||
void failFastWithVersionOfGradle6LowerThanRequired() {
|
||||
BuildResult result = this.gradleBuild.gradleVersion("6.7.1").buildAndFail();
|
||||
assertThat(result.getOutput()).contains(
|
||||
"Spring Boot plugin requires Gradle 6.8.x, 6.9.x, or 7.x. The current version is Gradle 6.7.1");
|
||||
void failFastWithVersionOfGradle7LowerThanRequired() {
|
||||
BuildResult result = this.gradleBuild.gradleVersion("7.3.3").buildAndFail();
|
||||
assertThat(result.getOutput())
|
||||
.contains("Spring Boot plugin requires Gradle 7.x (7.4 or later). The current version is Gradle 7.3.3");
|
||||
}
|
||||
|
||||
@DisabledForJreRange(min = JRE.JAVA_16)
|
||||
|
||||
Reference in New Issue
Block a user