EPMRPP-111932 || Upgrade Java 21 → 25#34
Conversation
WalkthroughThis PR updates the project's Java version from 21 to 25, upgrades the Gradle wrapper from 8.10.2 to 9.3.1, and updates related build dependencies and configuration. It includes workflow updates, dependency version bumps, plugin upgrades, and comprehensive rewrites of shell scripts for POSIX compliance. Changes
Estimated code review effort🎯 5 (Critical) | ⏱️ ~100+ minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In @.github/workflows/manually-release.yml:
- Line 27: The workflow step using the checkout action should be updated from
actions/checkout@v2 to actions/checkout@v4; locate the step that contains "uses:
actions/checkout@v2" and change it to "uses: actions/checkout@v4", then run or
validate the workflow to ensure there are no breaking input/behavior changes
with actions/checkout (e.g., any custom inputs remain compatible) before pushing
the change.
In `@build.gradle`:
- Around line 14-16: The workDir and npmWorkDir assignments eagerly resolve
DirectoryProperty via .get().asFile, which breaks Gradle's lazy configuration;
update the assignments for workDir and npmWorkDir to use lazy-compatible file()
calls derived from layout.buildDirectory (e.g., use
file("${layout.buildDirectory}/ui") and file("${layout.buildDirectory}/npm"))
while leaving nodeProjectDir (file("${project.rootDir}/ui")) unchanged so the
node-gradle plugin receives DirectoryProperty-compatible values and preserves
configuration avoidance.
🧹 Nitpick comments (2)
build.gradle (1)
32-35:mavenCentral { url = "..." }is redundant — consider simplifying tomavenCentral().
mavenCentral()already points tohttps://repo1.maven.org/maven2. Overriding the URL within the configuration closure is a no-op. In Gradle 9.x, configuring well-known repositories this way may trigger deprecation warnings.♻️ Suggested simplification
- mavenCentral { url = "https://repo1.maven.org/maven2" } + mavenCentral().github/workflows/release.yml (1)
22-22: Consider bumpingactions/checkoutfromv2tov5for consistency withbuild.yml.
build.ymlalready usesactions/checkout@v5, but this workflow still references@v2. Older major versions run on deprecated Node runtimes and will eventually stop working on GitHub-hosted runners. Since you're already updating this file, it would be a low-risk fix:Proposed fix
- uses: actions/checkout@v2 + uses: actions/checkout@v5
| @@ -26,11 +26,11 @@ jobs: | |||
| - name: Checkout repository | |||
| uses: actions/checkout@v2 | |||
There was a problem hiding this comment.
actions/checkout@v2 is outdated — update to v4.
actions/checkout@v2 uses the deprecated Node.js 12 runtime and is missing security fixes from v3/v4. Since actions/setup-java was already updated to @v4, this should be updated as well for consistency and security.
♻️ Suggested fix
- uses: actions/checkout@v2
+ uses: actions/checkout@v4🧰 Tools
🪛 actionlint (1.7.10)
[error] 27-27: 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)
🤖 Prompt for AI Agents
In @.github/workflows/manually-release.yml at line 27, The workflow step using
the checkout action should be updated from actions/checkout@v2 to
actions/checkout@v4; locate the step that contains "uses: actions/checkout@v2"
and change it to "uses: actions/checkout@v4", then run or validate the workflow
to ensure there are no breaking input/behavior changes with actions/checkout
(e.g., any custom inputs remain compatible) before pushing the change.
| workDir = layout.buildDirectory.dir('ui').get().asFile | ||
| npmWorkDir = layout.buildDirectory.dir('npm').get().asFile | ||
| nodeProjectDir = file("${project.rootDir}/ui") |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cat -n build.gradle | head -30Repository: reportportal/plugin-slack
Length of output: 1092
🏁 Script executed:
# Check gradle plugin versions
rg -n "id|plugins|node" build.gradle | head -20Repository: reportportal/plugin-slack
Length of output: 483
🏁 Script executed:
# Check if there's a gradle wrapper or properties file that defines plugin versions
fd -e "gradle.properties" -e "settings.gradle" | xargs cat 2>/dev/nullRepository: reportportal/plugin-slack
Length of output: 51
🌐 Web query:
node-gradle plugin 7.x Property<Directory> workDir npmWorkDir API
💡 Result:
In node-gradle / gradle-node-plugin 7.x (com.github.node-gradle.node), the node { ... } extension exposes:
workDir: the directory where the downloaded Node.js distribution is unpackednpmWorkDir: the directory where npm is installed (when using a specificnpmVersion)
In Gradle terms these are DirectoryProperty (i.e., a Property<Directory>-style API), so in Kotlin DSL you typically configure them with .set(...) (or assign a File, which Gradle can coerce).
Kotlin DSL (recommended style)
node {
workDir.set(layout.projectDirectory.dir(".gradle/node/nodejs"))
npmWorkDir.set(layout.projectDirectory.dir(".gradle/node/npm"))
}Groovy DSL (common in examples)
node {
workDir = file("$buildDir/nodejs")
npmWorkDir = file("$buildDir/npm")
}Example usage in a real build (Apache Solr) sets both workDir and npmWorkDir explicitly. [1]
Related: node-gradle’s task API uses DirectoryProperty for task working directories as well (e.g., NodeTask.getWorkingDir()). [2]
Sources: Apache Solr build config example for workDir/npmWorkDir [1]; node-gradle plugin task API showing DirectoryProperty usage [2]; plugin portal entry for node-gradle 7.x line. [3]
[1] https://apache.googlesource.com/solr/%2B/refs/heads/main/gradle/node.gradle
[2] https://node-gradle.github.io/gradle-node-plugin/com/github/gradle/node/task/NodeTask.html
[3] https://plugins.gradle.org/plugin/com.github.node-gradle.node
Simplify node-gradle property assignments to use lazy evaluation.
The node-gradle 7.1.0 plugin uses DirectoryProperty for workDir and npmWorkDir. The current .get().asFile pattern eagerly resolves these lazy properties, bypassing Gradle's configuration avoidance optimization. Simplify to idiomatic Groovy DSL:
workDir = file("${layout.buildDirectory}/ui")
npmWorkDir = file("${layout.buildDirectory}/npm")This maintains type compatibility while preserving lazy evaluation.
🤖 Prompt for AI Agents
In `@build.gradle` around lines 14 - 16, The workDir and npmWorkDir assignments
eagerly resolve DirectoryProperty via .get().asFile, which breaks Gradle's lazy
configuration; update the assignments for workDir and npmWorkDir to use
lazy-compatible file() calls derived from layout.buildDirectory (e.g., use
file("${layout.buildDirectory}/ui") and file("${layout.buildDirectory}/npm"))
while leaving nodeProjectDir (file("${project.rootDir}/ui")) unchanged so the
node-gradle plugin receives DirectoryProperty-compatible values and preserves
configuration avoidance.
Summary by CodeRabbit