From 27bcfc046ef776bd6dff452c70f00307d494931f Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sun, 24 Nov 2024 15:54:23 +0700 Subject: [PATCH] [FEATURE] Upgrade minimum version to Java 21 --- .../pro/gravit/launchserver/helper/MakeProfileHelper.java | 8 ++------ Launcher/build.gradle | 6 +++--- LauncherAPI/build.gradle | 4 ++-- LauncherClient/build.gradle | 4 ++-- LauncherCore/build.gradle | 4 ++-- LauncherStart/build.gradle | 4 ++-- ServerWrapper/build.gradle | 6 +++--- build.gradle | 2 +- modules | 2 +- 9 files changed, 18 insertions(+), 22 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/helper/MakeProfileHelper.java b/LaunchServer/src/main/java/pro/gravit/launchserver/helper/MakeProfileHelper.java index 5b375301..c1c51b1c 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/helper/MakeProfileHelper.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/helper/MakeProfileHelper.java @@ -153,12 +153,8 @@ public static ClientProfile makeProfile(ClientProfile.Version version, String ti } } } - builder.setMinJavaVersion(17); - builder.setRecommendJavaVersion(17); - if(version.compareTo(ClientProfileVersions.MINECRAFT_1_20_3) >= 0) { - builder.setMinJavaVersion(21); - builder.setRecommendJavaVersion(21); - } + builder.setMinJavaVersion(21); + builder.setRecommendJavaVersion(21); jvmArgs.add("-Dfml.ignorePatchDiscrepancies=true"); jvmArgs.add("-Dfml.ignoreInvalidMinecraftCertificates=true"); builder.setJvmArgs(jvmArgs); diff --git a/Launcher/build.gradle b/Launcher/build.gradle index 42ed13a7..2852258a 100644 --- a/Launcher/build.gradle +++ b/Launcher/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'com.github.johnrengelman.shadow' +apply plugin: 'com.gradleup.shadow' String mainClassName = "pro.gravit.launcher.start.ClientLauncherWrapper" @@ -7,8 +7,8 @@ url "https://repo.spring.io/plugins-release/" } } -sourceCompatibility = '17' -targetCompatibility = '17' +sourceCompatibility = '21' +targetCompatibility = '21' configurations { bundle diff --git a/LauncherAPI/build.gradle b/LauncherAPI/build.gradle index d66ee2a7..76b3a3eb 100644 --- a/LauncherAPI/build.gradle +++ b/LauncherAPI/build.gradle @@ -1,5 +1,5 @@ -sourceCompatibility = '17' -targetCompatibility = '17' +sourceCompatibility = '21' +targetCompatibility = '21' dependencies { api project(':LauncherCore') diff --git a/LauncherClient/build.gradle b/LauncherClient/build.gradle index 78ad4310..8562cfe8 100644 --- a/LauncherClient/build.gradle +++ b/LauncherClient/build.gradle @@ -7,8 +7,8 @@ url "https://repo.spring.io/plugins-release/" } } -sourceCompatibility = '17' -targetCompatibility = '17' +sourceCompatibility = '21' +targetCompatibility = '21' jar { archiveClassifier.set('clean') diff --git a/LauncherCore/build.gradle b/LauncherCore/build.gradle index 068bbf70..131a0dc9 100644 --- a/LauncherCore/build.gradle +++ b/LauncherCore/build.gradle @@ -1,5 +1,5 @@ -sourceCompatibility = '17' -targetCompatibility = '17' +sourceCompatibility = '21' +targetCompatibility = '21' dependencies { compileOnly group: 'org.fusesource.jansi', name: 'jansi', version: rootProject['verJansi'] diff --git a/LauncherStart/build.gradle b/LauncherStart/build.gradle index 225658f7..94b2c502 100644 --- a/LauncherStart/build.gradle +++ b/LauncherStart/build.gradle @@ -8,8 +8,8 @@ url "https://repo.spring.io/plugins-release/" } } -sourceCompatibility = '17' -targetCompatibility = '17' +sourceCompatibility = '21' +targetCompatibility = '21' jar { archiveClassifier.set('clean') diff --git a/ServerWrapper/build.gradle b/ServerWrapper/build.gradle index 68a4f2bc..ea46bbc7 100644 --- a/ServerWrapper/build.gradle +++ b/ServerWrapper/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'com.github.johnrengelman.shadow' +apply plugin: 'com.gradleup.shadow' String mainClassName = "pro.gravit.launcher.server.ServerWrapper" String mainAgentName = "pro.gravit.launcher.server.ServerAgent" @@ -14,8 +14,8 @@ } } -sourceCompatibility = '17' -targetCompatibility = '17' +sourceCompatibility = '21' +targetCompatibility = '21' jar { archiveClassifier.set('clean') diff --git a/build.gradle b/build.gradle index a658cec2..ca3ac1f0 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'com.github.johnrengelman.shadow' version '7.1.2' apply false + id 'com.gradleup.shadow' version '8.3.5' apply false id 'maven-publish' id 'signing' id 'org.openjfx.javafxplugin' version '0.1.0' apply false diff --git a/modules b/modules index 0d8cef92..755009c2 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 0d8cef927b1fda3097dc88c3adcffc4d0e33dd69 +Subproject commit 755009c292ce35273b8a7e584088a0932ab17e7c