Migrate to Java 25 and Gradle 9.5.1 (without Java source changes) - #6396
Migrate to Java 25 and Gradle 9.5.1 (without Java source changes)#6396Thevakumar-Luheerathan wants to merge 11 commits into
Conversation
…27-050400-74f7e6bf - Upgrade Gradle wrapper to 9.5.1 - Replace com.gradle.enterprise with com.gradle.develocity plugin - Upgrade net.researchgate.release to 3.1.0 for Gradle 9 compatibility - Replace all deprecated buildDir references with layout.buildDirectory - Replace Project.exec() calls with ExecOperations injection pattern - Remove deprecated sourceCompatibility/targetCompatibility (replaced by toolchain) - Add Java 25 toolchain to all Java subprojects - Upgrade Ballerina Gradle plugin to 4.0.0 (Java 25 + Gradle 9.5.1 compatible) - Update ballerinaLangVersion to 2201.14.0-20260527-050400-74f7e6bf - Update all platform.java21 TOML sections to platform.java25 - Add patchBallerinaScripts task to fix bal binary permissions and remove --sun-misc-unsafe-memory-access=allow flag (removed in Java 25) - Upgrade SpotBugs Gradle plugin to 6.5.1 for Java 25 class file support - Add SpotBugs exclusions for THROWS/AT/USELESS_STRING detectors introduced in SpotBugs 4.9.x (bundled in plugin >= 6.2.0) - Update CI workflow to use pull-request-build-template.yml@java-25-migration - Fix settings.gradle projectDir path typo (missing slash before config) - Replace deprecated JavaExec.main with mainClass property - Replace deprecated fileMode with filePermissions API for Gradle 9
Applied fixes: A1+B1+B4, A4, B3, B5+C1 - Make patchBallerinaScripts idempotent and add task @input properties (A1, B1) - Use token-level JVM flag removal instead of line filter (B4) - Remove mavenLocal() from plugin repositories (A4) - Scope SpotBugs suppressions to module packages (A5) - Add Gradle wrapper integrity checksum (B3) - Wire jacocoVersion property to JaCoCo toolVersion (B5) - Bump JaCoCo to 0.8.14 for stable Java 25 support (C1)
…ling space in bal run argument (D3, D7)
… lang version Gradle 9.5.1's Zip/Copy tasks no longer preserve source file permissions by default, which stripped the executable bit from bin/bal both in the extracted jballerina-tools artifact and in every packaged distribution zip. Point patchBallerinaScripts at the actual extraction path, order it before buildDistRepo, and declare filePermissions explicitly on the tools-artifact copy specs for all platform packaging tasks.
bal run/test executes the compiled program in a child JVM spawned by the CLI's own Java code, which doesn't inherit the launcher script's JVM args or JAVA_OPTS. JAVA_TOOL_OPTIONS is the one channel every JVM reads automatically regardless of how it's launched, so export it with --sun-misc-unsafe-memory-access=allow and --enable-native-access=ALL-UNNAMED instead of stripping the former. Also relax the BBE output-verification filter to ignore any "Picked up JAVA_TOOL_OPTIONS" banner instead of one exact string, since the value now differs.
|
Warning Review limit reached
Next review available in: 49 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (26)
✨ 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 |
Purpose
Migrates the distribution build to Java 25 and Gradle 9.5.1, excluding any Java source (
*.java) changes. This branch carries only build/config updates:build.gradle,gradle/javaProject.gradle, modulebuild.gradlefiles)gradle.properties,settings.gradle).github/workflows/*.yml)README.md,docs/build-ballerina-from-source.md)Verified that the diff against
mastercontains no*.javafiles.