From 6efd9ed0b05d50aa7f0ef27c3466ba003f3c8151 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 18 Aug 2023 14:05:50 +0200 Subject: [PATCH] Test Gradle plugin against Gradle 8.3 Closes gh-37025 --- .../gradle/plugin/KotlinPluginActionIntegrationTests.java | 7 ++++++- .../boot/testsupport/gradle/testkit/GradleVersions.java | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/KotlinPluginActionIntegrationTests.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/KotlinPluginActionIntegrationTests.java index e629de7d0f..8bf34bd2dd 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/KotlinPluginActionIntegrationTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/KotlinPluginActionIntegrationTests.java @@ -85,9 +85,14 @@ class KotlinPluginActionIntegrationTests { if (GradleVersion.version(this.gradleBuild.getGradleVersion()).compareTo(GradleVersion.version("7.3.3")) < 0) { assertThat(configured).containsExactly("help"); } - else { + else if (GradleVersion.version(this.gradleBuild.getGradleVersion()) + .compareTo(GradleVersion.version("8.3")) < 0) { assertThat(configured).containsExactlyInAnyOrder("help", "clean", "compileKotlin", "compileTestKotlin"); } + else { + assertThat(configured).containsExactlyInAnyOrder("help", "clean", "compileJava", "compileKotlin", + "compileTestKotlin"); + } } } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleVersions.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleVersions.java index d599626f9c..5df8846585 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleVersions.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleVersions.java @@ -34,15 +34,15 @@ public final class GradleVersions { public static List allCompatible() { if (isJava18()) { - return Arrays.asList("7.3.3", GradleVersion.current().getVersion(), "8.0.2", "8.2.1"); + return Arrays.asList("7.3.3", GradleVersion.current().getVersion(), "8.0.2", "8.3"); } if (isJava17()) { - return Arrays.asList("7.2", GradleVersion.current().getVersion(), "8.0.2", "8.2.1"); + return Arrays.asList("7.2", GradleVersion.current().getVersion(), "8.0.2", "8.3"); } if (isJava16()) { - return Arrays.asList("7.0.2", GradleVersion.current().getVersion(), "8.0.2", "8.2.1"); + return Arrays.asList("7.0.2", GradleVersion.current().getVersion(), "8.0.2", "8.3"); } - return Arrays.asList("6.8.3", "6.9.4", "7.0.2", GradleVersion.current().getVersion(), "8.0.2", "8.2.1"); + return Arrays.asList("6.8.3", "6.9.4", "7.0.2", GradleVersion.current().getVersion(), "8.0.2", "8.3"); } public static String minimumCompatible() {