Skip to content

Migrate to Java 25 and Gradle 9.5.1 (without Java source changes) - #6396

Open
Thevakumar-Luheerathan wants to merge 11 commits into
masterfrom
java-25-mig-wo-java-change
Open

Migrate to Java 25 and Gradle 9.5.1 (without Java source changes)#6396
Thevakumar-Luheerathan wants to merge 11 commits into
masterfrom
java-25-mig-wo-java-change

Conversation

@Thevakumar-Luheerathan

Copy link
Copy Markdown
Member

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:

  • Gradle wrapper upgrade to 9.5.1 and related build script updates (build.gradle, gradle/javaProject.gradle, module build.gradle files)
  • Java toolchain/target updated to 25 (gradle.properties, settings.gradle)
  • CI workflow updates (.github/workflows/*.yml)
  • Documentation updates (README.md, docs/build-ballerina-from-source.md)

Verified that the diff against master contains no *.java files.

…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)
… 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.
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@Thevakumar-Luheerathan, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 49 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 93dc7f5e-d6cc-4acf-b4f8-b889c53761c7

📥 Commits

Reviewing files that changed from the base of the PR and between ff2dd24 and c939b90.

📒 Files selected for processing (26)
  • .github/workflows/bbe-on-demand.yml
  • .github/workflows/daily-build-editor.yml
  • .github/workflows/daily-build.yml
  • .github/workflows/language_server_simulator_fhir.yml
  • .github/workflows/language_server_simulator_nballerina.yml
  • .github/workflows/main.yml
  • .github/workflows/publish-release-artifacts.yml
  • .github/workflows/publish-release.yml
  • .github/workflows/publish_release_bi.yml
  • .github/workflows/pull-request.yml
  • README.md
  • ballerina-test/build.gradle
  • ballerina/build.gradle
  • build-time-tests/build.gradle
  • build.gradle
  • cache-generator/build.gradle
  • config/checkstyle/build.gradle
  • devtools-integration-tests/build.gradle
  • docs/build-ballerina-from-source.md
  • gradle.properties
  • gradle/javaProject.gradle
  • gradle/wrapper/gradle-wrapper.properties
  • language-server-simulator/build.gradle
  • project-api-tests/build.gradle
  • project-api-tests/src/test/resources/central/projectB/Ballerina.toml
  • settings.gradle
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch java-25-mig-wo-java-change

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant