diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 57b999ec00..6604f99e1e 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -36,15 +36,15 @@ jobs: branch: buildjre8 name: jre8-pojav - - name: Get JRE17 + - name: Get JRE21 uses: dawidd6/action-download-artifact@v2 with: workflow: build.yml path: app_solcraftlauncher/src/main/assets/components/jre-new workflow_conclusion: success repo: PojavLauncherTeam/android-openjdk-build-multiarch - branch: buildjre17 - name: jre17-pojav + branch: buildjre21 + name: jre21-pojav - uses: gradle/gradle-build-action@v2 with: diff --git a/app_solcraftlauncher/src/main/java/net/kdt/pojavlaunch/JRE17Util.java b/app_solcraftlauncher/src/main/java/net/kdt/pojavlaunch/JRE21Util.java similarity index 90% rename from app_solcraftlauncher/src/main/java/net/kdt/pojavlaunch/JRE17Util.java rename to app_solcraftlauncher/src/main/java/net/kdt/pojavlaunch/JRE21Util.java index 1cd0dca35b..c88e497f07 100644 --- a/app_solcraftlauncher/src/main/java/net/kdt/pojavlaunch/JRE17Util.java +++ b/app_solcraftlauncher/src/main/java/net/kdt/pojavlaunch/JRE21Util.java @@ -13,8 +13,8 @@ import java.io.IOException; -public class JRE17Util { - public static final String NEW_JRE_NAME = "Internal-17"; +public class JRE21Util { + public static final String NEW_JRE_NAME = "Internal-21"; public static boolean checkInternalNewJre(AssetManager assetManager) { String launcher_jre17_version; String installed_jre17_version = MultiRTUtils.__internal__readBinpackVersion(NEW_JRE_NAME); @@ -35,8 +35,8 @@ private static boolean unpackJre17(AssetManager assetManager, String rt_version) MultiRTUtils.installRuntimeNamedBinpack( assetManager.open("components/jre-new/universal.tar.xz"), assetManager.open("components/jre-new/bin-" + archAsString(Tools.DEVICE_ARCHITECTURE) + ".tar.xz"), - "Internal-17", rt_version); - MultiRTUtils.postPrepare("Internal-17"); + "Internal-21", rt_version); + MultiRTUtils.postPrepare("Internal-21"); return true; }catch (IOException e) { Log.e("JRE17Auto", "Internal JRE unpack failed", e); @@ -67,18 +67,18 @@ public static boolean installNewJreIfNeeded(Activity activity, JMinecraftVersion String appropriateRuntime = MultiRTUtils.getNearestJreName(versionInfo.javaVersion.majorVersion); if (appropriateRuntime != null) { - if (JRE17Util.isInternalNewJRE(appropriateRuntime)) { - JRE17Util.checkInternalNewJre(activity.getAssets()); + if (JRE21Util.isInternalNewJRE(appropriateRuntime)) { + JRE21Util.checkInternalNewJre(activity.getAssets()); } minecraftProfile.javaDir = Tools.LAUNCHERPROFILES_RTPREFIX + appropriateRuntime; LauncherProfiles.load(); } else { if (versionInfo.javaVersion.majorVersion <= 17) { // there's a chance we have an internal one for this case - if (!JRE17Util.checkInternalNewJre(activity.getAssets())){ + if (!JRE21Util.checkInternalNewJre(activity.getAssets())){ showRuntimeFail(activity, versionInfo); return false; } else { - minecraftProfile.javaDir = Tools.LAUNCHERPROFILES_RTPREFIX + JRE17Util.NEW_JRE_NAME; + minecraftProfile.javaDir = Tools.LAUNCHERPROFILES_RTPREFIX + JRE21Util.NEW_JRE_NAME; LauncherProfiles.load(); } } else { diff --git a/app_solcraftlauncher/src/main/java/net/kdt/pojavlaunch/tasks/MinecraftDownloader.java b/app_solcraftlauncher/src/main/java/net/kdt/pojavlaunch/tasks/MinecraftDownloader.java index 167c165382..0ad0900ea4 100644 --- a/app_solcraftlauncher/src/main/java/net/kdt/pojavlaunch/tasks/MinecraftDownloader.java +++ b/app_solcraftlauncher/src/main/java/net/kdt/pojavlaunch/tasks/MinecraftDownloader.java @@ -13,7 +13,7 @@ import net.kdt.pojavlaunch.JAssetInfo; import net.kdt.pojavlaunch.JAssets; import net.kdt.pojavlaunch.JMinecraftVersionList; -import net.kdt.pojavlaunch.JRE17Util; +import net.kdt.pojavlaunch.JRE21Util; import net.kdt.pojavlaunch.R; import net.kdt.pojavlaunch.Tools; import net.kdt.pojavlaunch.mirrors.DownloadMirror; @@ -203,7 +203,7 @@ private boolean downloadAndProcessMetadata(Activity activity, JMinecraftVersionL throw new IOException("Unable to read Version JSON for version " + versionName); } - if(activity != null && !JRE17Util.installNewJreIfNeeded(activity, verInfo)){ + if(activity != null && !JRE21Util.installNewJreIfNeeded(activity, verInfo)){ return false; }