mirror of https://github.com/FabricMC/yarn.git
Remove java < 11 support for yarns buildscript. (#2296)
This commit is contained in:
parent
ec97f0745c
commit
f42f7bb2ed
|
@ -4,7 +4,7 @@ jobs:
|
||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
java: [8-jdk, 11-jdk, 15-jdk]
|
java: [11-jdk, 15-jdk]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container:
|
container:
|
||||||
image: openjdk:${{ matrix.java }}
|
image: openjdk:${{ matrix.java }}
|
||||||
|
|
17
build.gradle
17
build.gradle
|
@ -777,12 +777,6 @@ task sourcesJar(type: Jar, dependsOn: classes) {
|
||||||
|
|
||||||
compilePackageDocsJava {
|
compilePackageDocsJava {
|
||||||
it.options.encoding = "UTF-8"
|
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
|
it.options.release = 11
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -885,12 +879,6 @@ task genFakeSource(type: JavaExec, dependsOn: ["mergeV2", "mapNamedJar"]) {
|
||||||
group = "javadoc generation"
|
group = "javadoc generation"
|
||||||
outputs.upToDateWhen { false }
|
outputs.upToDateWhen { false }
|
||||||
|
|
||||||
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11)) {
|
|
||||||
javaLauncher = javaToolchains.launcherFor {
|
|
||||||
languageVersion = JavaLanguageVersion.of(11)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
main "net.fabricmc.mappingpoet.Main"
|
main "net.fabricmc.mappingpoet.Main"
|
||||||
classpath configurations.mappingPoet
|
classpath configurations.mappingPoet
|
||||||
// use merged v2 so we have all namespaces in jd
|
// use merged v2 so we have all namespaces in jd
|
||||||
|
@ -924,11 +912,6 @@ javadoc {
|
||||||
|
|
||||||
failOnError = false
|
failOnError = false
|
||||||
|
|
||||||
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11)) {
|
|
||||||
javadocTool = javaToolchains.javadocToolFor {
|
|
||||||
languageVersion = JavaLanguageVersion.of(11)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// verbose = true // enable to debug
|
// verbose = true // enable to debug
|
||||||
options {
|
options {
|
||||||
// verbose() // enable to debug
|
// verbose() // enable to debug
|
||||||
|
|
|
@ -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"
|
rootProject.name = "yarn"
|
||||||
|
|
||||||
includeBuild 'build-logic'
|
includeBuild 'build-logic'
|
Loading…
Reference in New Issue