EPMRPP-111932 || Upgrade Java 21 → 25#112
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe PR updates Java versions from 21 to 25 across CI workflows and build configurations, upgrades Gradle wrapper from 8.10.2 to 9.3.1, adds the Shadow JAR plugin, updates Spring Boot to 3.5.9, modernizes shell scripts for POSIX compliance, and refactors Node/UI build configuration to use Gradle layout APIs. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 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: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
project-properties.gradle (1)
10-10:⚠️ Potential issue | 🟠 MajorUpdate
$buildDirtolayout.buildDirectory— deprecated in Gradle 8, still needs migration for future compatibility.
$buildDiris deprecated as of Gradle 8.0 and should be replaced withlayout.buildDirectory. While it's not yet removed in Gradle 9.3.1, it's targeted for removal in Gradle 10, and updating now ensures forward compatibility.There are multiple occurrences across the codebase:
project-properties.gradle:10:pluginsDir = "$buildDir/plugins"build.gradle:61, 62, 71: Multiple uses in source directories and output configurations🔧 Proposed fix
For
project-properties.gradle:10:- pluginsDir = "$buildDir/plugins" + pluginsDir = layout.buildDirectory.dir("plugins").get().asFile.pathFor
build.gradle, update similarly:- srcDirs "$buildDir/generated/src/main/java" + srcDirs layout.buildDirectory.dir("generated/src/main/java").get().asFileOr, if the API accepts a
Provider<Directory>, omit.get().asFile.pathto keep things lazy (preferred):- pluginsDir = "$buildDir/plugins" + pluginsDir = layout.buildDirectory.dir("plugins")build.gradle (1)
58-65:⚠️ Potential issue | 🔴 Critical
$buildDiris removed in Gradle 9.x — this will break the build.The
project.buildDirproperty (and the$buildDirshorthand) was deprecated in Gradle 8.x and removed in Gradle 9.x. Since this PR upgrades the Gradle wrapper to 9.3.1, references to$buildDiron lines 61, 62, and 71 will fail at build time.Migrate to
layout.buildDirectory:Suggested fix
sourceSets { main { java { - srcDirs "$buildDir/generated/src/main/java" - exclude("$buildDir/generated/src/main/java/com/epam/reportportal/api/jira/MyselfApi.java") + srcDirs layout.buildDirectory.dir("generated/src/main/java") + exclude("**/com/epam/reportportal/api/jira/MyselfApi.java") } } }And for the
generateJiraApitask (line 71):tasks.register('generateJiraApi', GenerateTask) { generatorName.set("java") inputSpec.set("$rootDir/src/main/resources/openapi/swagger-v3.v3.json") - outputDir.set("$buildDir/generated") + outputDir.set(layout.buildDirectory.dir("generated").get().asFile.absolutePath) configFile.set("$rootDir/src/main/resources/openapi/config.json") ignoreFileOverride = "${projectDir.path}/.openapi-generator-ignore" skipOverwrite.set(true) }
🤖 Fix all issues with AI agents
In `@ui.gradle`:
- Around line 5-7: The npmWorkDir is currently pointed at the source tree
(npmWorkDir = file("${project.rootDir}/ui")) which causes npm to install
artifacts into source; change npmWorkDir to use the build directory instead
(same pattern as workDir using layout.buildDirectory.dir('ui').get().asFile)
while keeping nodeProjectDir pointed at the source; update the npmWorkDir
assignment to reference the build directory so generated npm distribution files
are written to the build cache rather than ui/ in source.
🧹 Nitpick comments (4)
.github/workflows/manually-release.yml (1)
27-27:actions/checkout@v2is outdated — consider upgrading to@v4.While the
setup-javaaction was correctly updated to@v4,actions/checkoutis still on@v2.v4uses Node 20 (v2 uses Node 12, which is EOL) and has performance improvements for large repos.♻️ Proposed fix
- name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4.github/workflows/release.yml (1)
22-22:actions/checkout@v2is outdated — same as inmanually-release.yml.♻️ Proposed fix
- name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4build.gradle (2)
23-23: Redundant URL override insidemavenCentral.
mavenCentral()already points tohttps://repo1.maven.org/maven2. Wrapping it in a configuration block to set the same URL is unnecessary. Simplify to justmavenCentral().Suggested fix
repositories { - mavenCentral { url = "https://repo1.maven.org/maven2" } + mavenCentral() maven { url = "https://packages.atlassian.com/maven/repository/public" }
40-41: Pinned to a short commit hash — consider using a more descriptive reference.The
service-apidependency is pinned to commit7044a29. This is a 7-character short hash, which could become ambiguous as the repo grows. Consider using the full SHA or a tagged version/branch reference for clarity and traceability.
Summary by CodeRabbit