Skip to content

Commit

Permalink
Remove java < 11 support for yarns buildscript. (#2296)
Browse files Browse the repository at this point in the history
  • Loading branch information
modmuss50 authored Apr 9, 2021
1 parent ec97f07 commit f42f7bb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
17 changes: 0 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit f42f7bb

Please sign in to comment.