From 4870d456c92713a30dddf057697f1ebeb97dc5e7 Mon Sep 17 00:00:00 2001 From: coolGi2007 Date: Sun, 2 Jan 2022 04:54:16 +0000 Subject: [PATCH] Updated java version in build.gradle --- build.gradle | 11 +++++++++-- core | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 6dab71737..49992e2b6 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { id "architectury-plugin" version "3.4-SNAPSHOT" - id "dev.architectury.loom" version "0.10.0.195" apply false + id "dev.architectury.loom" version "0.10.0-SNAPSHOT" apply false } architectury { @@ -56,7 +56,14 @@ allprojects { tasks.withType(JavaCompile) { options.encoding = "UTF-8" - options.release = 8 + + // The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too + // JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used. + // We'll use that if it's available, but otherwise we'll use the older option. + def targetVersion = 8 + if (JavaVersion.current().isJava9Compatible()) { + options.release = targetVersion + } } java { diff --git a/core b/core index 975c24c8a..219ad9c45 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 975c24c8a9650dcfa9bd817d4c803c108ff1123a +Subproject commit 219ad9c45ac48b705e7a034d74383b636b2c9006