From 4612c65f67a5ccb8308d95da28e8d83b77303cf7 Mon Sep 17 00:00:00 2001 From: shartte Date: Wed, 1 May 2024 21:39:47 +0200 Subject: [PATCH] Bump SecureJarHandler after breaking changes (#125) * Bump SecureJarHandler * Bump SJH * Bump to run on Java 21, since SJH requires it. * Bump to run on Java 21, since SJH requires it. * Bump to run on Java 21, since SJH requires it. * Add add-opens for JMH --- .github/workflows/build-prs.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/test_jvms.yml | 11 +++++------ build.gradle | 5 +++-- gradle.properties | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-prs.yml b/.github/workflows/build-prs.yml index 11e73a0..d251ba2 100644 --- a/.github/workflows/build-prs.yml +++ b/.github/workflows/build-prs.yml @@ -16,5 +16,5 @@ jobs: build: uses: neoforged/actions/.github/workflows/build-prs.yml@main with: - java: 17 + java: 21 gradle_tasks: test \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eacff53..108570f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: release: uses: neoforged/actions/.github/workflows/gradle-publish.yml@main with: - java: 17 + java: 21 pre_gradle_tasks: test gradle_tasks: publish secrets: diff --git a/.github/workflows/test_jvms.yml b/.github/workflows/test_jvms.yml index 177ef32..7577594 100644 --- a/.github/workflows/test_jvms.yml +++ b/.github/workflows/test_jvms.yml @@ -16,14 +16,13 @@ jobs: max-parallel: 10 fail-fast: false matrix: - jvm_version: [ 17, 18, 19, 20 ] - jdk: [ Graal_VM, Adoptium, Azul, IBM, Oracle, Amazon, BellSoft, SAP ] - exclude: - - jdk: Graal_VM - jvm_version: 18 # Graal doesn't have a dedicated J18 version + jvm_version: [ 21, 22 ] + jdk: [ Graal_VM, Adoptium, Azul, Oracle, Amazon, BellSoft, SAP ] include: + - jdk: IBM + jvm_version: 21 # IBM only has 21 - jdk: Microsoft - jvm_version: 17 # MS OpenJDK only has 11 and 177 + jvm_version: 21 # MS OpenJDK only has 21 steps: - name: Checkout repository uses: actions/checkout@main diff --git a/build.gradle b/build.gradle index a9ffd93..41bcfe9 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ plugins { } java { - toolchain.languageVersion = JavaLanguageVersion.of(17) + toolchain.languageVersion = JavaLanguageVersion.of(21) withSourcesJar() } @@ -115,6 +115,7 @@ tasks.register('jmh', JavaExec) { jvmArgs( '--module-path', sourceSets.jmh.runtimeClasspath.asPath, '--add-modules', 'ALL-MODULE-PATH', + '--add-opens', 'java.base/java.lang.invoke=cpw.mods.securejarhandler', '--add-opens', 'cpw.mods.modlauncher/cpw.mods.modlauncher=powermock.reflect', '--add-opens', 'cpw.mods.modlauncher/cpw.mods.modlauncher=cpw.mods.modlauncher.benchmarks', '--add-exports', 'cpw.mods.modlauncher.benchmarks/cpw.mods.modlauncher.benchmarks.jmh_generated=jmh.core' @@ -189,7 +190,7 @@ publishing { from components.java pom { name = 'Mod Launcher' - description = 'Java 17 mod launcher' + description = 'Java 21 mod launcher' pomUtils.githubRepo(it, 'modlauncher', 'McModLauncher') developers { diff --git a/gradle.properties b/gradle.properties index 0a8517b..025e35c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ #org.gradle.java.home=/home/cpw/minecraft/runtime/java-runtime-gamma/linux/java-runtime-gamma asm_version=9.5 -sjh_version=2.1.11 +sjh_version=3.0.4 log4j_version=2.20.0 jopt_version=5.0.4 jetbrains_ann_version=24.0.1