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 4323d8ba2a..cfb35aa41c 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 @@ -48,28 +48,31 @@ class KotlinPluginActionIntegrationTests { @TestTemplate void kotlinVersionPropertyIsSet() { - String output = this.gradleBuild.build("kotlinVersion", "dependencies", "--configuration", "compileClasspath") + String output = this.gradleBuild.expectDeprecationWarningsWithAtLeastVersion("8.1-rc-1") + .build("kotlinVersion", "dependencies", "--configuration", "compileClasspath") .getOutput(); assertThat(output).containsPattern("Kotlin version: [0-9]\\.[0-9]\\.[0-9]+"); } @TestTemplate void kotlinCompileTasksUseJavaParametersFlagByDefault() { - assertThat(this.gradleBuild.build("kotlinCompileTasksJavaParameters").getOutput()) - .contains("compileKotlin java parameters: true") + assertThat(this.gradleBuild.expectDeprecationWarningsWithAtLeastVersion("8.1-rc-1") + .build("kotlinCompileTasksJavaParameters") + .getOutput()).contains("compileKotlin java parameters: true") .contains("compileTestKotlin java parameters: true"); } @TestTemplate void kotlinCompileTasksCanOverrideDefaultJavaParametersFlag() { - assertThat(this.gradleBuild.build("kotlinCompileTasksJavaParameters").getOutput()) - .contains("compileKotlin java parameters: false") + assertThat(this.gradleBuild.expectDeprecationWarningsWithAtLeastVersion("8.1-rc-1") + .build("kotlinCompileTasksJavaParameters") + .getOutput()).contains("compileKotlin java parameters: false") .contains("compileTestKotlin java parameters: false"); } @TestTemplate void taskConfigurationIsAvoided() throws IOException { - BuildResult result = this.gradleBuild.build("help"); + BuildResult result = this.gradleBuild.expectDeprecationWarningsWithAtLeastVersion("8.1-rc-1").build("help"); String output = result.getOutput(); BufferedReader reader = new BufferedReader(new StringReader(output)); String line; 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 82938bc6d3..55b65b7512 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 @@ -32,7 +32,7 @@ public final class GradleVersions { } public static List allCompatible() { - return Arrays.asList("7.5.1", GradleVersion.current().getVersion(), "8.0.2"); + return Arrays.asList("7.5.1", GradleVersion.current().getVersion(), "8.0.2", "8.1"); } public static String minimumCompatible() {