Fully target Java 8.

This commit is contained in:
Username404-59 2021-04-08 11:35:51 +02:00
parent 6771734add
commit d4198589e4
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 4 additions and 3 deletions

View File

@ -27,7 +27,7 @@ allprojects {
apply(plugin = "architectury-plugin") apply(plugin = "architectury-plugin")
java { java {
targetCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11 sourceCompatibility = JavaVersion.VERSION_1_8
} }
tasks { tasks {
withType(com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar::class) { withType(com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar::class) {
@ -51,8 +51,9 @@ allprojects {
withType(JavaCompile::class) { withType(JavaCompile::class) {
with(options) { with(options) {
encoding = "UTF-8" encoding = "UTF-8"
release.set(8) if (JavaVersion.current().isJava9Compatible) {
isFork = true release.set(8)
}; isFork = true
} }
} }
withType(net.fabricmc.loom.task.RemapJarTask::class) { withType(net.fabricmc.loom.task.RemapJarTask::class) {