From 1a803448f0e3abb19ac585b4db8582920c9d52cc Mon Sep 17 00:00:00 2001 From: dreis2211 Date: Fri, 5 Mar 2021 20:19:49 +0100 Subject: [PATCH] Exclude GradleBuild tasks on JDK 16 for now See gh-25523 --- .../springframework/boot/build/toolchain/ToolchainPlugin.java | 2 ++ .../spring-boot-launch-script-tests/build.gradle | 4 ++++ .../spring-boot-loader-tests/build.gradle | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/buildSrc/src/main/java/org/springframework/boot/build/toolchain/ToolchainPlugin.java b/buildSrc/src/main/java/org/springframework/boot/build/toolchain/ToolchainPlugin.java index 093d5f3c65..28a3278180 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/toolchain/ToolchainPlugin.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/toolchain/ToolchainPlugin.java @@ -22,6 +22,7 @@ import java.util.List; import org.gradle.api.Plugin; import org.gradle.api.Project; import org.gradle.api.plugins.JavaPluginExtension; +import org.gradle.api.tasks.GradleBuild; import org.gradle.api.tasks.compile.JavaCompile; import org.gradle.api.tasks.javadoc.Javadoc; import org.gradle.api.tasks.testing.Test; @@ -70,6 +71,7 @@ public class ToolchainPlugin implements Plugin { project.getTasks().withType(JavaCompile.class, (task) -> task.setEnabled(false)); project.getTasks().withType(Javadoc.class, (task) -> task.setEnabled(false)); project.getTasks().withType(Test.class, (task) -> task.setEnabled(false)); + project.getTasks().withType(GradleBuild.class, (task) -> task.setEnabled(false)); } private void configureJavaCompileToolchain(Project project, ToolchainExtension toolchain) { diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-launch-script-tests/build.gradle b/spring-boot-tests/spring-boot-integration-tests/spring-boot-launch-script-tests/build.gradle index f0b5d3fb9b..dd9b806a06 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-launch-script-tests/build.gradle +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-launch-script-tests/build.gradle @@ -6,6 +6,10 @@ plugins { description = "Spring Boot Launch Script Integration Tests" +toolchain { + maximumCompatibleJavaVersion = JavaLanguageVersion.of(15) +} + configurations { app } diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/build.gradle b/spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/build.gradle index 7a39e57c46..9e81e00251 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/build.gradle +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/build.gradle @@ -6,6 +6,10 @@ plugins { description = "Spring Boot Loader Integration Tests" +toolchain { + maximumCompatibleJavaVersion = JavaLanguageVersion.of(15) +} + configurations { app }