From 94ca2d1e785fb332e29b7b5f43d3670f1fd377cd Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 30 Apr 2021 16:52:52 +0100 Subject: [PATCH] Test the Gradle plugin against Gradle 6.9-rc-1 Closes gh-26267 --- .../boot/gradle/junit/GradleCompatibilityExtension.java | 4 ++-- .../org/springframework/boot/gradle/testkit/GradleBuild.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/junit/GradleCompatibilityExtension.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/junit/GradleCompatibilityExtension.java index 5fe94cc91c..417368b53e 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/junit/GradleCompatibilityExtension.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/junit/GradleCompatibilityExtension.java @@ -45,10 +45,10 @@ public final class GradleCompatibilityExtension implements TestTemplateInvocatio JavaVersion javaVersion = JavaVersion.current(); if (javaVersion.isCompatibleWith(JavaVersion.VERSION_14) || javaVersion.isCompatibleWith(JavaVersion.VERSION_13)) { - GRADLE_VERSIONS = Arrays.asList("6.3", "6.4.1", "6.5.1", "6.6.1", "6.7.1", "default"); + GRADLE_VERSIONS = Arrays.asList("6.3", "6.4.1", "6.5.1", "6.6.1", "6.7.1", "default", "6.9-rc-1"); } else { - GRADLE_VERSIONS = Arrays.asList("5.6.4", "6.3", "6.4.1", "6.5.1", "6.6.1", "6.7.1", "default"); + GRADLE_VERSIONS = Arrays.asList("5.6.4", "6.3", "6.4.1", "6.5.1", "6.6.1", "6.7.1", "default", "6.9-rc-1"); } } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/testkit/GradleBuild.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/testkit/GradleBuild.java index b8c5b29cf0..68c67a2ff2 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/testkit/GradleBuild.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/testkit/GradleBuild.java @@ -152,6 +152,7 @@ public class GradleBuild { .replace("{version}", getBootVersion()) .replace("{dependency-management-plugin-version}", getDependencyManagementPluginVersion()); FileCopyUtils.copy(scriptContent, new FileWriter(new File(this.projectDir, "build" + this.dsl.getExtension()))); + new File(this.projectDir, "settings.gradle").createNewFile(); FileSystemUtils.copyRecursively(new File("src/test/resources/repository"), new File(this.projectDir, "repository")); GradleRunner gradleRunner = GradleRunner.create().withProjectDir(this.projectDir)