Skip to content

Commit 9e3031f

Browse files
committed
Merge remote-tracking branch 'origin/master-1.21-lts' into master-1.21
2 parents 963b2c6 + cc5d6be commit 9e3031f

File tree

29 files changed

+235
-20
lines changed

29 files changed

+235
-20
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,27 @@ concurrency:
55
group: ${{ github.workflow }}-${{ github.ref }}
66
cancel-in-progress: true
77

8+
env:
9+
DEFAULT_JAVA_VERSION: 21
10+
DEFAULT_JAVA_DISTRIBUTION: 'microsoft'
11+
812
jobs:
913
build:
10-
name: Build
14+
name: Build for Java ${{ matrix.java }} on ${{ matrix.distribution }}
1115
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
java:
20+
- 21
21+
- 22
22+
- 23
23+
distribution:
24+
- 'adopt-hotspot'
25+
- 'oracle'
26+
include:
27+
- java: 21
28+
distribution: 'microsoft'
1229
steps:
1330
- name: 'Checkout'
1431
uses: actions/checkout@v4
@@ -19,8 +36,8 @@ jobs:
1936
- name: 'Setup Java'
2037
uses: actions/setup-java@v4
2138
with:
22-
distribution: 'microsoft'
23-
java-version: 21
39+
distribution: ${{ matrix.distribution }}
40+
java-version: ${{ matrix.java }}
2441
- name: 'Setup Gradle'
2542
uses: gradle/actions/setup-gradle@v3
2643
with:
@@ -60,28 +77,30 @@ jobs:
6077
uses: coverallsapp/github-action@v2
6178
- name: 'Deploy as GitHub CI artifacts'
6279
uses: actions/upload-artifact@v4
80+
if: startsWith(matrix.java, env.DEFAULT_JAVA_VERSION) && startsWith(matrix.java, env.DEFAULT_JAVA_VERSION) && startsWith(matrix.distribution, env.DEFAULT_JAVA_DISTRIBUTION)
6381
with:
6482
if-no-files-found: error
6583
path: build/libs/*
6684
- name: 'Deploy to CurseForge'
67-
if: startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/master')
85+
if: (startsWith(github.ref, 'refs/tags/') || (!startsWith(github.event.head_commit.message, 'Bump mod version') && startsWith(github.ref, 'refs/heads/master'))) && startsWith(matrix.java, env.DEFAULT_JAVA_VERSION) && startsWith(matrix.distribution, env.DEFAULT_JAVA_DISTRIBUTION)
6886
env:
6987
CURSEFORGE_KEY_SECRET: ${{ secrets.CURSEFORGE_KEY_SECRET }}
7088
run: ./gradlew publishCurseForge
7189
- name: 'Deploy to Modrinth'
72-
if: startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/master')
90+
continue-on-error: true
91+
if: (startsWith(github.ref, 'refs/tags/') || (!startsWith(github.event.head_commit.message, 'Bump mod version') && startsWith(github.ref, 'refs/heads/master'))) && startsWith(matrix.java, env.DEFAULT_JAVA_VERSION) && startsWith(matrix.distribution, env.DEFAULT_JAVA_DISTRIBUTION)
7392
env:
7493
MODRINTH_KEY_SECRET: ${{ secrets.MODRINTH_KEY_SECRET }}
7594
run: ./gradlew modrinth
7695
- name: 'Deploy to Maven'
77-
if: startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/heads/feature')
96+
if: (startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/heads/feature')) && startsWith(matrix.java, env.DEFAULT_JAVA_VERSION) && startsWith(matrix.distribution, env.DEFAULT_JAVA_DISTRIBUTION)
7897
env:
7998
MAVEN_URL: ${{ secrets.MAVEN_URL }}
8099
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
81100
MAVEN_KEY: ${{ secrets.MAVEN_KEY }}
82101
run: ./gradlew publish
83102
- name: 'Deploy JavaDoc to GitHub Pages'
84-
if: startsWith(github.ref, 'refs/heads/master')
103+
if: startsWith(github.ref, 'refs/heads/master') && startsWith(matrix.java, env.DEFAULT_JAVA_VERSION) && startsWith(matrix.distribution, env.DEFAULT_JAVA_DISTRIBUTION)
85104
uses: JamesIves/github-pages-deploy-action@v4
86105
with:
87106
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/crowdin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
uses: crowdin/github-action@v2
1717
with:
1818
upload_sources: true
19-
upload_translations: true
19+
upload_translations: false
2020
download_translations: true
2121
localization_branch_name: l10n_crowdin_translations
2222
create_pull_request: true

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
[![Coverage Status](https://coveralls.io/repos/github/CyclopsMC/IntegratedScripting/badge.svg)](https://coveralls.io/github/CyclopsMC/IntegratedScripting)
55
[![Download](https://img.shields.io/static/v1?label=Maven&message=GitHub%20Packages&color=blue)](https://github.com/CyclopsMC/packages/packages/1901862)
66
[![Crowdin](https://badges.crowdin.net/integratedscripting/localized.svg)](https://crowdin.com/project/integratedscripting)
7-
[![CurseForge](http://cf.way2muchnoise.eu/full_889785_downloads.svg)](https://minecraft.curseforge.com/projects/integrated-scripting)
7+
[![CurseForge](http://cf.way2muchnoise.eu/full_889785_downloads.svg)](https://www.curseforge.com/minecraft/mc-mods/integrated-scripting)
88
[![Discord](https://img.shields.io/discord/386052815128100865.svg?colorB=7289DA&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHYAAABWAgMAAABnZYq0AAAACVBMVEUAAB38%2FPz%2F%2F%2F%2Bm8P%2F9AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfhBxwQJhxy2iqrAAABoElEQVRIx7WWzdGEIAyGgcMeKMESrMJ6rILZCiiBg4eYKr%2Fd1ZAfgXFm98sJfAyGNwno3G9sLucgYGpQ4OGVRxQTREMDZjF7ILSWjoiHo1n%2BE03Aw8p7CNY5IhkYd%2F%2F6MtO3f8BNhR1QWnarCH4tr6myl0cWgUVNcfMcXACP1hKrGMt8wcAyxide7Ymcgqale7hN6846uJCkQxw6GG7h2MH4Czz3cLqD1zHu0VOXMfZjHLoYvsdd0Q7ZvsOkafJ1P4QXxrWFd14wMc60h8JKCbyQvImzlFjyGoZTKzohwWR2UzSONHhYXBQOaKKsySsahwGGDnb%2FiYPJw22sCqzirSULYy1qtHhXGbtgrM0oagBV4XiTJok3GoLoDNH8ooTmBm7ZMsbpFzi2bgPGoXWXME6XT%2BRJ4GLddxJ4PpQy7tmfoU2HPN6cKg%2BledKHBKlF8oNSt5w5g5o8eXhu1IOlpl5kGerDxIVT%2BztzKepulD8utXqpChamkzzuo7xYGk%2FkpSYuviLXun5bzdRf0Krejzqyz7Z3p0I1v2d6HmA07dofmS48njAiuMgAAAAASUVORK5CYII%3D)](https://discord.gg/9yDxubB)
99

1010
Create scripts for handling operations in Integrated Dynamics.
1111

12-
All stable releases (including deobfuscated builds) can be found on [CurseForge](https://minecraft.curseforge.com/projects/integrated-scripting/files).
12+
All stable releases (including deobfuscated builds) can be found on [CurseForge](https://www.curseforge.com/minecraft/mc-mods/integrated-scripting/files).
1313

1414
[Development builds](https://github.com/CyclopsMC/packages/packages/) are hosted as GitHub packages.
1515

build.gradle

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,14 @@ dependencies {
142142
transitive = false
143143
}
144144

145-
modLib "org.graalvm.sdk:graal-sdk:22.3.2"
146-
shadow "org.graalvm.sdk:graal-sdk:22.3.2"
147-
modLib ("org.graalvm.js:js:22.3.2") {
145+
// https://mvnrepository.com/artifact/org.graalvm.sdk/graal-sdk
146+
modLib "org.graalvm.sdk:graal-sdk:${project.graal_version}"
147+
shadow "org.graalvm.sdk:graal-sdk:${project.graal_version}"
148+
// https://mvnrepository.com/artifact/org.graalvm.js/js
149+
modLib ("org.graalvm.js:js:${project.graal_version}") {
148150
exclude group: 'com.ibm.icu', module: 'icu4j'
149151
}
150-
shadow "org.graalvm.js:js:22.3.2"
152+
shadow "org.graalvm.js:js:${project.graal_version}"
151153

152154
testImplementation "junit:junit:4.12"
153155
testImplementation "org.mockito:mockito-core:1.+"
@@ -255,8 +257,12 @@ shadowJar {
255257
archiveClassifier.set(''); // Replace the default JAR
256258
// To avoid clashes with other mods
257259
relocate 'org.graalvm', 'org.cyclops.integratedscripting.vendors.org.graalvm'
258-
relocate 'com.oracle', 'org.cyclops.integratedscripting.vendors.com.oracle'
259260
relocate 'com.ibm', 'org.cyclops.integratedscripting.vendors.com.ibm'
261+
// Relocate everything from com.oracle, except for com.oracle.truffle, as this is defined in a native lib, which can not be relocated
262+
// relocate 'com.oracle', 'org.cyclops.integratedscripting.vendors.com.oracle'
263+
relocate 'com.oracle.js', 'org.cyclops.integratedscripting.vendors.com.oracle.js'
264+
relocate 'com.oracle.svm', 'org.cyclops.integratedscripting.vendors.com.oracle.svm'
265+
// relocate 'com.oracle.truffle', 'org.cyclops.integratedscripting.vendors.com.oracle.truffle' // Relocation of this fails for com.oracle.truffle.runtime.ModulesSupport at runtime
260266
}
261267
assemble.dependsOn shadowJar
262268
jar {
@@ -426,3 +432,9 @@ tasks.configureEach { task ->
426432
task.enabled = false
427433
}
428434
}
435+
436+
task benchmark(type: JavaExec) {
437+
classpath sourceSets.test.runtimeClasspath
438+
main = "org.cyclops.integratedscripting.evaluate.translation.BenchmarkValueTranslators"
439+
}
440+
test.dependsOn benchmark

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ neoforge_loader_version_range=[4,)
2626
neoforge_update_json_url=https://raw.githubusercontent.com/CyclopsMC/Versions/master/neoforge_update/integrated-scripting.json
2727

2828
# Dependencies
29+
graal_version=24.1.1
2930
cyclopscore_version=1.25.5-704
3031
integrateddynamics_version=1.24.1-1059
3132
commoncapabilities_version=2.9.7-194
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
As always, don't forget to backup your world before updating!
2+
Requires CyclopsCore version 1.19.0 or higher.
3+
4+
Changes:
5+
* Restrict access to parts of the Java API
6+
They can still be enabled if desired by the server admin.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
As always, don't forget to backup your world before updating!
2+
Requires CyclopsCore version 1.19.0 or higher.
3+
4+
Fixes:
5+
* Fix display panel crash when translation undefined values, Closes #27
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
As always, don't forget to backup your world before updating!
2+
Requires CyclopsCore version 1.19.0 or higher.
3+
4+
Fixes:
5+
* Fix infinite loop not being properly caught, Closes #28
6+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
As always, don't forget to backup your world before updating!
2+
Requires CyclopsCore version 1.19.0 or higher.
3+
4+
Fixes:
5+
* Update to graal 24.1.1, fixes issues for some JDK 23 users, Closes #30
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
As always, don't forget to backup your world before updating!
2+
Requires CyclopsCore version 1.19.0 or higher.
3+
4+
Fixes:
5+
* Re-enable shadow renames, except for com.oracle.truffle, Closes #32
6+
This makes this mod work correctle on all JVMs, including GraalVM 21 and 23.
7+

0 commit comments

Comments
 (0)