Skip to content

Gradle fixes for jar-infer-lib#1314

Merged
msridhar merged 12 commits intomasterfrom
gradle-fixes
Oct 19, 2025
Merged

Gradle fixes for jar-infer-lib#1314
msridhar merged 12 commits intomasterfrom
gradle-fixes

Conversation

@msridhar
Copy link
Copy Markdown
Collaborator

@msridhar msridhar commented Oct 18, 2025

  • We were only adding a test dependence for the test task but not other test tasks running on different JDKs; add it for all tasks of type Test.
  • Force the JDK 25 tests to run on Azul (Zulu JDK). They don't work on Temurin, and despite installing Zulu JDKs on CI, the Gradle toolchain logic is still choosing the Temurin JDKs for some reason. This fix may be needed elsewhere, but for now this is sufficient to fix CI.

Also opportunistically bump some versions of some actions.

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated continuous integration workflow with upgraded GitHub Actions (checkout, setup-java, setup-gradle to v5) for improved build pipeline stability, enhanced security measures, and better platform compatibility.
    • Enhanced build system configuration with improved Java toolchain management capabilities, including support for Java 25 and optimized test task dependencies.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Oct 18, 2025

Walkthrough

This pull request makes two categories of changes: (1) upgrades GitHub Actions in the CI workflow from v4 to v5 for checkout, setup-java, and setup-gradle steps, and (2) modifies the Gradle build configuration to add test task dependencies on Android library bundling and introduces a dedicated testJdk25 task configuration with Java 25 toolchain support using the Azul vendor.

Possibly related PRs

Suggested reviewers

  • lazaroclapp
  • yuxincs

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "Gradle fixes for jar-infer-lib" is clearly related to the primary focus of this pull request. The main changes involve updates to the jar-infer-lib build configuration to add test task dependencies and force JDK 25 tests to run on the Azul toolchain, which are accurately captured by the term "Gradle fixes." While the PR also includes opportunistic GitHub Actions version bumps to the CI workflow, the title appropriately emphasizes the primary objective of fixing Gradle build configuration. The title is specific enough to identify the affected component and conveys meaningful information about the changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch gradle-fixes

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between defbda5 and ca5a430.

📒 Files selected for processing (2)
  • .github/workflows/continuous-integration.yml (1 hunks)
  • jar-infer/jar-infer-lib/build.gradle (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-09T19:59:16.543Z
Learnt from: msridhar
PR: uber/NullAway#1243
File: jdk-annotations/astubx-generator/build.gradle:22-22
Timestamp: 2025-10-09T19:59:16.543Z
Learning: When disabling testJdk17 tasks for modules requiring JDK 21, use `onlyIf { false }` to skip the task:
```gradle
tasks.named("testJdk17").configure {
    onlyIf { false }
}
```
Do not use `doFirst { throw new GradleException(...) }` as it will cause CI failures when the task is executed.

Applied to files:

  • jar-infer/jar-infer-lib/build.gradle
🔇 Additional comments (3)
.github/workflows/continuous-integration.yml (1)

23-32: Verify GitHub Actions version inconsistency across jobs.

Lines 23–32 upgrade actions to v5 in the build job, but lines 71–78 in the compile-other-projects job remain on v4. This creates version drift across the workflow.

Clarify whether keeping compile-other-projects on v4 is intentional or an oversight. If intentional, document why; if unintentional, upgrade to v5 for consistency.

jar-infer/jar-infer-lib/build.gradle (2)

45-47: Test task dependency wiring looks good.

Using tasks.withType(Test).configureEach { } correctly applies the bundleReleaseAar dependency to all Test task variants (testJdk17, testJdk21, testJdk25, etc.), aligning with the PR objective to cover tests on different JDKs.


49-54: No issues found. Original review comment is incorrect.

The testJdk25 task is created by the nullaway.java-test-conventions plugin via tasks.register("testJdk25", Test) for JDK versions [17, 25], so tasks.getByName('testJdk25') will successfully retrieve it without throwing NoSuchTaskException. JvmVendorSpec.AZUL is a valid constant in the Gradle API and is officially supported, so the build will not fail due to this vendor specification.


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 and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.39%. Comparing base (defbda5) to head (ca5a430).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1314   +/-   ##
=========================================
  Coverage     88.39%   88.39%           
  Complexity     2516     2516           
=========================================
  Files            94       94           
  Lines          8393     8393           
  Branches       1657     1657           
=========================================
  Hits           7419     7419           
  Misses          491      491           
  Partials        483      483           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@msridhar msridhar enabled auto-merge (squash) October 18, 2025 19:00
@msridhar
Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Oct 18, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@msridhar msridhar disabled auto-merge October 19, 2025 00:28
@msridhar msridhar enabled auto-merge (squash) October 19, 2025 00:29
@msridhar msridhar merged commit d8f298d into master Oct 19, 2025
11 checks passed
@msridhar msridhar deleted the gradle-fixes branch October 19, 2025 16:21
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.

3 participants