Raise the minimum supported version of Gradle 6 to 6.3
Closes gh-20532
This commit is contained in:
@@ -43,10 +43,8 @@ class RunningDocumentationTests {
|
||||
@TestTemplate
|
||||
@DisabledForJreRange(min = JRE.JAVA_13)
|
||||
void bootRunMain() throws IOException {
|
||||
// Testing of convention mappings is flakey between 5.2 and 6.0 inclusive
|
||||
// https://github.com/gradle/gradle/issues/11323
|
||||
assertThat(this.gradleBuild.gradleVersion("6.1-rc-2").script("src/docs/gradle/running/boot-run-main")
|
||||
.build("configuredMainClass").getOutput()).contains("com.example.ExampleApplication");
|
||||
assertThat(this.gradleBuild.script("src/docs/gradle/running/boot-run-main").build("configuredMainClass")
|
||||
.getOutput()).contains("com.example.ExampleApplication");
|
||||
}
|
||||
|
||||
@TestTemplate
|
||||
|
||||
@@ -42,14 +42,13 @@ public final class GradleCompatibilityExtension implements TestTemplateInvocatio
|
||||
private static final List<String> GRADLE_VERSIONS;
|
||||
|
||||
static {
|
||||
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_14)) {
|
||||
JavaVersion javaVersion = JavaVersion.current();
|
||||
if (javaVersion.isCompatibleWith(JavaVersion.VERSION_14)
|
||||
|| javaVersion.isCompatibleWith(JavaVersion.VERSION_13)) {
|
||||
GRADLE_VERSIONS = Arrays.asList("default");
|
||||
}
|
||||
else if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_13)) {
|
||||
GRADLE_VERSIONS = Arrays.asList("6.0.1", "6.1.1", "6.2.2", "default");
|
||||
}
|
||||
else {
|
||||
GRADLE_VERSIONS = Arrays.asList("5.6.4", "6.0.1", "6.1.1", "6.2.2", "default");
|
||||
GRADLE_VERSIONS = Arrays.asList("5.6.4", "default");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,24 +42,39 @@ class SpringBootPluginIntegrationTests {
|
||||
|
||||
@DisabledForJreRange(min = JRE.JAVA_14)
|
||||
@Test
|
||||
void failFastWithVersionOfGradleLowerThanRequired() {
|
||||
void failFastWithVersionOfGradle5LowerThanRequired() {
|
||||
BuildResult result = this.gradleBuild.gradleVersion("5.5.1").buildAndFail();
|
||||
assertThat(result.getOutput())
|
||||
.contains("Spring Boot plugin requires Gradle 5.6 or later. The current version is Gradle 5.5.1");
|
||||
.contains("Spring Boot plugin requires Gradle 5 (5.6.x only) or Gradle 6 (6.3 or later). "
|
||||
+ "The current version is Gradle 5.5.1");
|
||||
}
|
||||
|
||||
@DisabledForJreRange(min = JRE.JAVA_14)
|
||||
@Test
|
||||
void failFastWithVersionOfGradle6LowerThanRequired() {
|
||||
BuildResult result = this.gradleBuild.gradleVersion("6.2.2").buildAndFail();
|
||||
assertThat(result.getOutput())
|
||||
.contains("Spring Boot plugin requires Gradle 5 (5.6.x only) or Gradle 6 (6.3 or later). "
|
||||
+ "The current version is Gradle 6.2.2");
|
||||
}
|
||||
|
||||
@DisabledForJreRange(min = JRE.JAVA_13)
|
||||
@Test
|
||||
void succeedWithVersionOfGradleHigherThanRequired() {
|
||||
void succeedWithVersionOfGradle5HigherThanRequired() {
|
||||
this.gradleBuild.gradleVersion("5.6.1").build();
|
||||
}
|
||||
|
||||
@DisabledForJreRange(min = JRE.JAVA_13)
|
||||
@Test
|
||||
void succeedWithVersionOfGradleMatchingWhatIsRequired() {
|
||||
void succeedWithVersionOfGradle6MatchingWhatIsRequired() {
|
||||
this.gradleBuild.gradleVersion("5.6").build();
|
||||
}
|
||||
|
||||
@Test
|
||||
void succeedWithVersionOfGradle6MatchingWithIsRequired() {
|
||||
this.gradleBuild.gradleVersion("6.3").build();
|
||||
}
|
||||
|
||||
@Test
|
||||
void unresolvedDependenciesAreAnalyzedWhenDependencyResolutionFails() throws IOException {
|
||||
createMinimalMainSource();
|
||||
|
||||
Reference in New Issue
Block a user