-
-
Notifications
You must be signed in to change notification settings - Fork 11
Update to java 25 #478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Update to java 25 #478
Changes from all commits
7dd350f
aa23431
7e725ca
9bf47f3
f5bd5d8
55b7e55
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,11 +15,11 @@ jobs: | |
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Set up JDK 21 | ||
| - name: Set up JDK 25 | ||
| uses: actions/setup-java@v3 | ||
| with: | ||
| distribution: "temurin" | ||
| java-version: 21 | ||
| java-version: 25 | ||
| cache: 'gradle' | ||
|
|
||
| - name: Grant execute permission for gradlew | ||
|
|
@@ -46,18 +46,21 @@ jobs: | |
| name: Package ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Set up JDK 21 | ||
| uses: actions/setup-java@v3 | ||
| - name: Set up JDK 25 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: "temurin" | ||
| java-version: 21 | ||
| java-version: 25 | ||
| cache: 'gradle' | ||
|
|
||
| - name: Grant execute permission for gradlew | ||
| run: chmod +x gradlew | ||
|
|
||
| - name: Package with Gradle | ||
| run: ./gradlew -x test --stacktrace jpackage --parallel --no-daemon -PgeneratorVersion="${{ github.event.inputs.version }}" | ||
| run: | | ||
| ./gradlew -x test --stacktrace jlink --parallel -PgeneratorVersion="${{ github.event.inputs.version }}" | ||
| ./generator/build/image/bin/java -XX:AOTCacheOutput=generator/build/image/bin/neroxis-generator.aot -XX:+UseCompactObjectHeaders -m com.faforever.neroxis.generator/com.faforever.neroxis.generator.MapGenerator --out-path ./GeneratedMaps | ||
| ./gradlew -x test --stacktrace jpackage --parallel -PgeneratorVersion="${{ github.event.inputs.version }}" | ||
|
Comment on lines
+60
to
+63
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: find . -name "release.yml" -path "*/.github/workflows/*" | head -5Repository: FAForever/Neroxis-Map-Generator Length of output: 106 🏁 Script executed: cat -n ./.github/workflows/release.yml | sed -n '50,75p'Repository: FAForever/Neroxis-Map-Generator Length of output: 1468 🏁 Script executed: cat -n ./.github/workflows/release.yml | sed -n '1,50p'Repository: FAForever/Neroxis-Map-Generator Length of output: 1776 🌐 Web query:
💡 Result: Short answer: jlink produces a platform-specific runtime image that includes the java launcher with the normal OS filename — on Windows that is java.exe in the image's bin\ directory. A Windows-targeted jlink image will contain bin\java.exe; a Linux-targeted image will contain bin/java (no .exe) and will not run on Windows. When using GitHub Actions build matrix, generate the Windows jlink image on a Windows runner (or use Windows JDK jmods when cross-building) and invoke the runtime via Sources
🌐 Web query:
💡 Result: Short answer: On Windows runners GitHub Actions’ shell: bash runs the Git-for-Windows bash (bash.exe). That bash still relies on Windows PATH/PATHEXT behavior and the MSYS/MSYS2 emulation layer — so executable lookup can differ from native cmd/powershell. If a program isn’t found when you call its bare name (java) but exists as java.exe, call java.exe or use the full path or fix PATH so bash can see the Windows location. You can also switch the step to a Windows-native shell (pwsh or cmd) where PATHEXT resolution behaves like normal Windows. Examples and links below. Actionable options
If you want, tell me which runner image and workflow step (example run block) and I’ll give the exact syntax to fix it. Citations: 🏁 Script executed: cat -n ./.github/workflows/release.yml | sed -n '59,64p'Repository: FAForever/Neroxis-Map-Generator Length of output: 858 AOT generation will fail on Windows runners due to missing When jlink runs on Windows, it produces The workflow matrix includes 🤖 Prompt for AI Agents |
||
|
|
||
| - name: Archive jpackage artifacts | ||
| uses: actions/upload-artifact@v4 | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,8 +4,8 @@ plugins { | |
| } | ||
|
|
||
| java { | ||
| sourceCompatibility = JavaVersion.VERSION_21 | ||
| targetCompatibility = JavaVersion.VERSION_21 | ||
| sourceCompatibility = JavaVersion.VERSION_25 | ||
| targetCompatibility = JavaVersion.VERSION_25 | ||
| } | ||
|
|
||
| repositories { | ||
|
|
@@ -15,15 +15,15 @@ repositories { | |
| dependencies { | ||
| api("org.jspecify:jspecify:1.0.0") | ||
|
|
||
| val lombokVersion = "1.18.38" | ||
| val lombokVersion = "1.18.42" | ||
| compileOnly("org.projectlombok:lombok:$lombokVersion") | ||
| annotationProcessor("org.projectlombok:lombok:$lombokVersion") | ||
|
Comment on lines
+18
to
20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: Short answer: Lombok 1.18.42 adds JDK 25 compatibility (release dated Sep 20, 2025), but there are still active/closed issues reporting JDK 25-related breakages — test your code (and consider newer Lombok releases if problems appear). [1][2][3][4] Sources:
Test Lombok 1.18.42 thoroughly with JDK 25 before merging. While Lombok 1.18.42 adds JDK 25 compatibility support, there are known issues reported including compilation failures and val usage restrictions with JDK 25. Test your codebase with this version, and consider upgrading to a newer Lombok release if you encounter compatibility problems. 🤖 Prompt for AI Agents |
||
|
|
||
| val picocliVersion = "4.7.7" | ||
| implementation("info.picocli:picocli:$picocliVersion") | ||
| annotationProcessor("info.picocli:picocli-codegen:$picocliVersion") | ||
|
|
||
| val junitVersion = "5.13.1" | ||
| val junitVersion = "6.0.1" | ||
| testImplementation(platform("org.junit:junit-bom:$junitVersion")) | ||
| testImplementation("org.junit.jupiter:junit-jupiter") | ||
| testRuntimeOnly("org.junit.platform:junit-platform-launcher") | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #!/bin/sh | ||
| SCRIPT_NAME=\$(basename "\$0") | ||
| APP_NAME=\${SCRIPT_NAME%.sh} | ||
|
|
||
| DIR="\${0%/*}" | ||
|
|
||
| "\$DIR/java" \$CDS_JVM_OPTS ${jvmArgs} -m ${moduleName}/${mainClassName} ${args} "\$@" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| @echo off | ||
| set DIR="%~dp0" | ||
| set JAVA_EXEC="%DIR:"=%\\java" | ||
|
|
||
| pushd %DIR% & %JAVA_EXEC% %CDS_JVM_OPTS% ${jvmArgs} -m ${moduleName}/${mainClassName} ${args} %* & popd |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -8,7 +8,6 @@ | |||||||||||||||||||||||
| import com.faforever.neroxis.map.placement.DecalPlacer; | ||||||||||||||||||||||||
| import com.faforever.neroxis.mask.BooleanMask; | ||||||||||||||||||||||||
| import com.faforever.neroxis.mask.FloatMask; | ||||||||||||||||||||||||
| import com.faforever.neroxis.util.Pipeline; | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| import java.util.Random; | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
|
@@ -25,18 +24,18 @@ public abstract class DecalGenerator implements HasParameterConstraints { | |||||||||||||||||||||||
| protected BooleanMask slopeDecal; | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| public void initialize(SCMap map, long seed, GeneratorParameters generatorParameters, | ||||||||||||||||||||||||
| SymmetrySettings symmetrySettings, TerrainGenerator terrainGenerator, Pipeline pipeline) { | ||||||||||||||||||||||||
| SymmetrySettings symmetrySettings, TerrainGenerator terrainGenerator) { | ||||||||||||||||||||||||
| this.map = map; | ||||||||||||||||||||||||
| this.random = new Random(seed); | ||||||||||||||||||||||||
| this.generatorParameters = generatorParameters; | ||||||||||||||||||||||||
| this.symmetrySettings = symmetrySettings; | ||||||||||||||||||||||||
| this.slope = terrainGenerator.getSlope(); | ||||||||||||||||||||||||
| this.passableLand = new BooleanMask(1, random.nextLong(), symmetrySettings, "passableLand", pipeline); | ||||||||||||||||||||||||
| this.slope = new FloatMask(1, random.nextLong(), symmetrySettings, "passableLand", pipeline); | ||||||||||||||||||||||||
| this.passableLand = new BooleanMask(1, random.nextLong(), symmetrySettings, "passableLand"); | ||||||||||||||||||||||||
| this.slope = new FloatMask(1, random.nextLong(), symmetrySettings, "passableLand"); | ||||||||||||||||||||||||
| passableLand.init(terrainGenerator.getPassableLand()); | ||||||||||||||||||||||||
| slope.init(terrainGenerator.getSlope()); | ||||||||||||||||||||||||
|
Comment on lines
32
to
36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix incorrect mask name and redundant assignment. There are two issues here:
This appears to be a copy-paste error where the mask name wasn't updated. 🔎 Proposed fix- this.slope = terrainGenerator.getSlope();
this.passableLand = new BooleanMask(1, random.nextLong(), symmetrySettings, "passableLand");
- this.slope = new FloatMask(1, random.nextLong(), symmetrySettings, "passableLand");
+ this.slope = new FloatMask(1, random.nextLong(), symmetrySettings, "slope");
passableLand.init(terrainGenerator.getPassableLand());
slope.init(terrainGenerator.getSlope());📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||
| fieldDecal = new BooleanMask(1, random.nextLong(), symmetrySettings, "fieldDecal", pipeline); | ||||||||||||||||||||||||
| slopeDecal = new BooleanMask(1, random.nextLong(), symmetrySettings, "slopeDecal", pipeline); | ||||||||||||||||||||||||
| fieldDecal = new BooleanMask(1, random.nextLong(), symmetrySettings, "fieldDecal"); | ||||||||||||||||||||||||
| slopeDecal = new BooleanMask(1, random.nextLong(), symmetrySettings, "slopeDecal"); | ||||||||||||||||||||||||
| decalPlacer = new DecalPlacer(map, random.nextLong()); | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update outdated GitHub Actions in the build job.
actions/checkout@v2is outdated; current major version is v4.actions/setup-java@v3is outdated; current version is v4.x (static analysis confirms this).🔎 Proposed fix
📝 Committable suggestion
🧰 Tools
🪛 actionlint (1.7.9)
17-17: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
19-19: the runner of "actions/setup-java@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🤖 Prompt for AI Agents