Allow the project to be built with Java 16
See gh-25171
This commit is contained in:
committed by
Andy Wilkinson
parent
181d0ee932
commit
1ccd8dae8a
@@ -10,6 +10,10 @@ plugins {
|
||||
|
||||
description = "Spring Boot Gradle Plugin"
|
||||
|
||||
toolchain {
|
||||
maximumCompatibleJavaVersion = 15
|
||||
}
|
||||
|
||||
configurations {
|
||||
asciidoctorExtensions {
|
||||
extendsFrom dependencyManagement
|
||||
|
||||
@@ -69,7 +69,7 @@ processResources {
|
||||
}
|
||||
|
||||
compileJava {
|
||||
if ((!project.hasProperty("buildJavaHome")) && JavaVersion.current() == JavaVersion.VERSION_1_8) {
|
||||
if ((!project.hasProperty("toolchainVersion")) && JavaVersion.current() == JavaVersion.VERSION_1_8) {
|
||||
options.compilerArgs += ['-Xlint:-sunapi', '-XDenableSunApiLintControl']
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,8 @@ import java.util.stream.Collectors;
|
||||
import java.util.zip.ZipEntry;
|
||||
|
||||
import org.junit.jupiter.api.TestTemplate;
|
||||
import org.junit.jupiter.api.condition.DisabledForJreRange;
|
||||
import org.junit.jupiter.api.condition.JRE;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import org.springframework.boot.loader.tools.FileUtils;
|
||||
@@ -247,6 +249,7 @@ class JarIntegrationTests extends AbstractArchiveIntegrationTests {
|
||||
});
|
||||
}
|
||||
|
||||
@DisabledForJreRange(min = JRE.JAVA_16) // Remove this once Kotlin supports Java 16
|
||||
@TestTemplate
|
||||
void whenAProjectUsesKotlinItsModuleMetadataIsRepackagedIntoBootInfClasses(MavenBuild mavenBuild) {
|
||||
mavenBuild.project("jar-with-kotlin-module").execute((project) -> {
|
||||
|
||||
Reference in New Issue
Block a user