From e3a9a28c62b48d58e800ee99b98d67e7466b6f8e Mon Sep 17 00:00:00 2001 From: ModProg Date: Thu, 2 Dec 2021 19:52:12 +0100 Subject: [PATCH] Java 17 --- .github/workflows/build.yml | 2 +- build.gradle | 8 ++++---- src/main/resources/fabric.mod.json | 2 +- src/main/resources/modid.mixins.json | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 48f6c91..0e62292 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: matrix: # Use these Java versions java: [ - 16 # Minimum supported by Minecraft + 17 # Minimum supported by Minecraft ] # and run on both Linux and Windows os: [ubuntu-20.04, windows-latest] diff --git a/build.gradle b/build.gradle index b25ef49..559d753 100644 --- a/build.gradle +++ b/build.gradle @@ -3,8 +3,8 @@ plugins { id 'maven-publish' } -sourceCompatibility = JavaVersion.VERSION_16 -targetCompatibility = JavaVersion.VERSION_16 +sourceCompatibility = JavaVersion.VERSION_17 +targetCompatibility = JavaVersion.VERSION_17 archivesBaseName = project.archives_base_name version = project.mod_version @@ -52,8 +52,8 @@ tasks.withType(JavaCompile).configureEach { // If Javadoc is generated, this must be specified in that task too. it.options.encoding = "UTF-8" - // Minecraft 1.17 (21w19a) upwards uses Java 16. - it.options.release = 16 + // Minecraft 1.18 (pre-release 2) upwards uses Java 17. + it.options.release = 17 } java { diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index ac6a4c6..b91f308 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -29,6 +29,6 @@ "depends": { "fabricloader": ">=0.11.3", "minecraft": "1.18.x", - "java": ">=16" + "java": ">=17" } } diff --git a/src/main/resources/modid.mixins.json b/src/main/resources/modid.mixins.json index 086694c..3ded8fb 100644 --- a/src/main/resources/modid.mixins.json +++ b/src/main/resources/modid.mixins.json @@ -2,7 +2,7 @@ "required": true, "minVersion": "0.8", "package": "nl.andrewlalis.speed_carts.mixin", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "AbstractMinecartMixin" ],