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 }