Skip to content

Don't use deprecated Gradle features#7800

Open
mernstcheckerframework wants to merge 4 commits into
typetools:masterfrom
mernst:gradle-deprecation
Open

Don't use deprecated Gradle features#7800
mernstcheckerframework wants to merge 4 commits into
typetools:masterfrom
mernst:gradle-deprecation

Conversation

@mernstcheckerframework

@mernstcheckerframework mernstcheckerframework commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

There may be better ways to implement the functionality.

There may be better ways to implement the functionality
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 94dd8025-37f5-49a0-9ba3-280e6f5e9b28

📥 Commits

Reviewing files that changed from the base of the PR and between 8c3c03f and 0989a36.

📒 Files selected for processing (2)
  • build.gradle
  • framework/build.gradle

📝 Walkthrough

Walkthrough

Changes

This change updates Gradle build scripts across the root project and several subprojects (checker-util, checker, dataflow, framework, javacutil) to consistently resolve properties, toolchain versions, dependency coordinates, and shared helper functions via rootProject and providers.gradleProperty(...) instead of local/unqualified references. It also modifies gradle-mvn-push.gradle to source publishing repository URLs and Sonatype credentials from providers.gradleProperty(...), adjusts checker task creation calls to use rootProject.createCheckTypeTask(...), changes the nullnessAll gate to check property presence, and reduces the Nullness checker's default argument list in one branch.

Sequence Diagram(s)

Not applicable — this change consists of configuration/wiring refactors in Gradle build scripts without an observable runtime call flow.

Possibly related PRs

Suggested reviewers: mernst

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
build.gradle (1)

134-136: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Restore the project version before publishing.
Removing version = releaseVersion leaves subprojects at unspecified; gradle-mvn-push.gradle still reads bare version, so snapshot detection and published artifact versions will be wrong. Either restore the assignment here or switch the publish script to rootProject.releaseVersion.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@build.gradle` around lines 134 - 136, The project version is no longer being
assigned in the allprojects block, which leaves subprojects at unspecified and
breaks publishing/version detection in gradle-mvn-push.gradle. Restore the
version setup in the allprojects/currentProj configuration or update the publish
logic to read rootProject.releaseVersion consistently so artifact versions and
snapshot handling use the intended releaseVersion value.
checker/bin-devel/test-misc.sh (1)

21-26: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Stale dead comment block.

These commented-out lines describe a workaround for spotlessGroovy flakiness that's no longer invoked anywhere in this script; consider trimming them now that the active spotlessCheck invocation itself no longer references Groovy exclusions, to avoid confusing future readers.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@checker/bin-devel/test-misc.sh` around lines 21 - 26, Remove the stale
commented-out spotlessGroovy workaround from test-misc.sh since it is no longer
used anywhere in the script. Update the surrounding logic around the active
spotlessCheck flow so the remaining comments only describe behavior that still
applies, and keep the cleanup localized to the obsolete block near the existing
spotlessCheck invocation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@build.gradle`:
- Around line 49-57: The useJdk21Compiler flag in build.gradle is being read as
a String and assigned to boolean jdk21Compiler, so a value like "false" can
still evaluate truthy in Groovy. Update the property handling around
providers.gradleProperty("useJdk21Compiler") so it explicitly parses the value
as a boolean instead of relying on Groovy coercion. Keep the change localized to
the jdk21Compiler assignment and preserve the existing fallback behavior when
the property is unset.

In `@framework/build.gradle`:
- Line 176: The delombok task still has an unqualified skipDelombok reference in
the doLast block, so update the remaining bare property access to use
rootProject.ext.skipDelombok consistently with the earlier change in
framework/build.gradle. Check the delombok task’s doLast logic and replace the
sibling conditional so both occurrences in this task use the same fully
qualified rootProject.ext.skipDelombok reference.

---

Outside diff comments:
In `@build.gradle`:
- Around line 134-136: The project version is no longer being assigned in the
allprojects block, which leaves subprojects at unspecified and breaks
publishing/version detection in gradle-mvn-push.gradle. Restore the version
setup in the allprojects/currentProj configuration or update the publish logic
to read rootProject.releaseVersion consistently so artifact versions and
snapshot handling use the intended releaseVersion value.

In `@checker/bin-devel/test-misc.sh`:
- Around line 21-26: Remove the stale commented-out spotlessGroovy workaround
from test-misc.sh since it is no longer used anywhere in the script. Update the
surrounding logic around the active spotlessCheck flow so the remaining comments
only describe behavior that still applies, and keep the cleanup localized to the
obsolete block near the existing spotlessCheck invocation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: bbadea71-78e9-448f-9ec7-01168aa19bbe

📥 Commits

Reviewing files that changed from the base of the PR and between 81c65b6 and 1d58081.

📒 Files selected for processing (8)
  • build.gradle
  • checker-util/build.gradle
  • checker/bin-devel/test-misc.sh
  • checker/build.gradle
  • dataflow/build.gradle
  • framework/build.gradle
  • gradle-mvn-push.gradle
  • javacutil/build.gradle

Comment thread build.gradle Outdated
Comment thread framework/build.gradle
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.

2 participants