Raise the minimum supported version of Gradle to 5.6
Closes gh-18777
This commit is contained in:
@@ -43,9 +43,9 @@ class RunningDocumentationTests {
|
||||
@TestTemplate
|
||||
@DisabledOnJre(JRE.JAVA_13)
|
||||
void bootRunMain() throws IOException {
|
||||
// TODO Testing of convention mappings is flakey in 5.2+
|
||||
// Testing of convention mappings is flakey between 5.2 and 6.0 inclusive
|
||||
// https://github.com/gradle/gradle/issues/11323
|
||||
assertThat(this.gradleBuild.gradleVersion("5.1.1").script("src/docs/gradle/running/boot-run-main")
|
||||
assertThat(this.gradleBuild.gradleVersion("6.1-rc-2").script("src/docs/gradle/running/boot-run-main")
|
||||
.build("configuredMainClass").getOutput()).contains("com.example.ExampleApplication");
|
||||
}
|
||||
|
||||
|
||||
@@ -47,8 +47,7 @@ public final class GradleCompatibilityExtension implements TestTemplateInvocatio
|
||||
GRADLE_VERSIONS = Collections.singletonList("default");
|
||||
}
|
||||
else {
|
||||
GRADLE_VERSIONS = Arrays.asList("4.10.3", "5.0", "5.1.1", "5.2.1", "5.3.1", "5.4.1", "5.5.1", "5.6.4",
|
||||
"default");
|
||||
GRADLE_VERSIONS = Arrays.asList("5.6.4", "default");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,19 +40,19 @@ class SpringBootPluginIntegrationTests {
|
||||
|
||||
@Test
|
||||
void failFastWithVersionOfGradleLowerThanRequired() {
|
||||
BuildResult result = this.gradleBuild.gradleVersion("4.9").buildAndFail();
|
||||
BuildResult result = this.gradleBuild.gradleVersion("5.5.1").buildAndFail();
|
||||
assertThat(result.getOutput())
|
||||
.contains("Spring Boot plugin requires Gradle 4.10 or later. The current version is Gradle 4.9");
|
||||
.contains("Spring Boot plugin requires Gradle 5.6 or later. The current version is Gradle 5.5.1");
|
||||
}
|
||||
|
||||
@Test
|
||||
void succeedWithVersionOfGradleHigherThanRequired() {
|
||||
this.gradleBuild.gradleVersion("4.10.1").build();
|
||||
this.gradleBuild.gradleVersion("5.6.1").build();
|
||||
}
|
||||
|
||||
@Test
|
||||
void succeedWithVersionOfGradleMatchingWhatIsRequired() {
|
||||
this.gradleBuild.gradleVersion("4.10").build();
|
||||
this.gradleBuild.gradleVersion("5.6").build();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -53,6 +53,8 @@ class LaunchScriptConfigurationTests {
|
||||
@Test
|
||||
void initInfoShortDescriptionUsesDescriptionByDefault() {
|
||||
given(this.project.getDescription()).willReturn("Project description");
|
||||
Property<String> baseName = stringProperty("base-name");
|
||||
given(this.task.getArchiveBaseName()).willReturn(baseName);
|
||||
assertThat(new LaunchScriptConfiguration(this.task).getProperties()).containsEntry("initInfoShortDescription",
|
||||
"Project description");
|
||||
}
|
||||
@@ -68,6 +70,8 @@ class LaunchScriptConfigurationTests {
|
||||
@Test
|
||||
void initInfoShortDescriptionUsesSingleLineVersionOfMultiLineProjectDescription() {
|
||||
given(this.project.getDescription()).willReturn("Project\ndescription");
|
||||
Property<String> baseName = stringProperty("base-name");
|
||||
given(this.task.getArchiveBaseName()).willReturn(baseName);
|
||||
assertThat(new LaunchScriptConfiguration(this.task).getProperties()).containsEntry("initInfoShortDescription",
|
||||
"Project description");
|
||||
}
|
||||
@@ -83,6 +87,8 @@ class LaunchScriptConfigurationTests {
|
||||
@Test
|
||||
void initInfoDescriptionUsesProjectDescriptionByDefault() {
|
||||
given(this.project.getDescription()).willReturn("Project description");
|
||||
Property<String> baseName = stringProperty("base-name");
|
||||
given(this.task.getArchiveBaseName()).willReturn(baseName);
|
||||
assertThat(new LaunchScriptConfiguration(this.task).getProperties()).containsEntry("initInfoDescription",
|
||||
"Project description");
|
||||
}
|
||||
@@ -90,6 +96,8 @@ class LaunchScriptConfigurationTests {
|
||||
@Test
|
||||
void initInfoDescriptionUsesCorrectlyFormattedMultiLineProjectDescription() {
|
||||
given(this.project.getDescription()).willReturn("The\nproject\ndescription");
|
||||
Property<String> baseName = stringProperty("base-name");
|
||||
given(this.task.getArchiveBaseName()).willReturn(baseName);
|
||||
assertThat(new LaunchScriptConfiguration(this.task).getProperties()).containsEntry("initInfoDescription",
|
||||
"The\n# project\n# description");
|
||||
}
|
||||
|
||||
@@ -149,9 +149,6 @@ public class GradleBuild {
|
||||
if (this.gradleVersion != null) {
|
||||
gradleRunner.withGradleVersion(this.gradleVersion);
|
||||
}
|
||||
else if (this.dsl == Dsl.KOTLIN) {
|
||||
gradleRunner.withGradleVersion("4.10.3");
|
||||
}
|
||||
List<String> allArguments = new ArrayList<>();
|
||||
allArguments.add("-PbootVersion=" + getBootVersion());
|
||||
allArguments.add("--stacktrace");
|
||||
|
||||
Reference in New Issue
Block a user