Remove java < 11 support for yarns buildscript. (#2296)

This commit is contained in:
modmuss50 2021-04-09 19:53:02 +01:00 committed by GitHub
parent ec97f0745c
commit f42f7bb2ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 18 deletions

View File

@ -4,7 +4,7 @@ jobs:
build:
strategy:
matrix:
java: [8-jdk, 11-jdk, 15-jdk]
java: [11-jdk, 15-jdk]
runs-on: ubuntu-20.04
container:
image: openjdk:${{ matrix.java }}

View File

@ -777,12 +777,6 @@ task sourcesJar(type: Jar, dependsOn: classes) {
compilePackageDocsJava {
it.options.encoding = "UTF-8"
// use java 11 as the package info files aren't consumed by downstream java 8 mods etc.
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11)) {
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(11)
}
}
it.options.release = 11
}
@ -885,12 +879,6 @@ task genFakeSource(type: JavaExec, dependsOn: ["mergeV2", "mapNamedJar"]) {
group = "javadoc generation"
outputs.upToDateWhen { false }
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11)) {
javaLauncher = javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(11)
}
}
main "net.fabricmc.mappingpoet.Main"
classpath configurations.mappingPoet
// use merged v2 so we have all namespaces in jd
@ -924,11 +912,6 @@ javadoc {
failOnError = false
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11)) {
javadocTool = javaToolchains.javadocToolFor {
languageVersion = JavaLanguageVersion.of(11)
}
}
// verbose = true // enable to debug
options {
// verbose() // enable to debug

View File

@ -1,3 +1,8 @@
// This check is done here before any plugins that may require java 11 are able to load.
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11)) {
throw new UnsupportedOperationException("Yarn's buildscript requires Java 11 or higher.")
}
rootProject.name = "yarn"
includeBuild 'build-logic'