-
Notifications
You must be signed in to change notification settings - Fork 425
Use version catalog. #7381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use version catalog. #7381
Conversation
📝 WalkthroughWalkthroughThis pull request migrates build configuration to a Gradle version catalog: it replaces hardcoded plugin IDs and dependency coordinates with Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (1 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
🔇 Additional comments (6)
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 (1)
build.gradle (1)
118-134: MigrategoogleJavaFormatVersionto version catalog and remove from gradle.properties.The
googleJavaFormatVersionvariable remains ingradle.properties(line 8) and has not been added togradle/libs.versions.toml, contradicting the PR's objective to centralize all versions in the catalog. This is actively used in build.gradle at lines 126, 353, and 356.Add
google-java-formattogradle/libs.versions.toml, removegoogleJavaFormatVersionfromgradle.properties, and update build.gradle to reference it from the catalog.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (11)
annotation-file-utilities/build.gradle(1 hunks)build.gradle(5 hunks)checker-qual/build.gradle(1 hunks)checker-util/build.gradle(1 hunks)checker/build.gradle(2 hunks)dataflow/build.gradle(1 hunks)framework-test/build.gradle(1 hunks)framework/build.gradle(2 hunks)gradle.properties(0 hunks)gradle/libs.versions.toml(1 hunks)javacutil/build.gradle(1 hunks)
💤 Files with no reviewable changes (1)
- gradle.properties
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-11-02T02:18:00.536Z
Learnt from: mernst
Repo: typetools/checker-framework PR: 7354
File: annotation-file-utilities/tests/LocalMultipleManyMethodsShifted.java:14-14
Timestamp: 2025-11-02T02:18:00.536Z
Learning: In the Checker Framework repository, when doing refactoring PRs (such as preferring isEmpty() over size() comparisons), test files should not be changed. Tests should remain stable to preserve their exact patterns for annotation processing and bytecode verification purposes.
Applied to files:
checker-util/build.gradle
🔇 Additional comments (15)
build.gradle (2)
1-20: Plugin declarations correctly migrated to version catalog aliases.The conversion from hardcoded plugin IDs to catalog aliases is properly formatted and follows Gradle's accessor naming conventions (kebab-case in TOML → dot notation in code).
210-211: Core dependency migrations correctly applied.All hardcoded dependency coordinates have been properly replaced with catalog references, and dependency exclusions are preserved. The comment on line 579 was updated in sync with the code change.
Also applies to: 578-579, 828-829, 960-965
checker-util/build.gradle (1)
9-9: Test dependency correctly migrated to catalog.The junit test dependency reference resolves to the version catalog entry that uses version 4.13.2.
javacutil/build.gradle (1)
14-16: Plumelib dependencies correctly migrated to catalog references.All three dependencies (hashmap-util, plume-util, reflection-util) are properly resolved through the version catalog.
framework-test/build.gradle (1)
6-6: Dependencies correctly migrated to version catalog.Both
libs.junitandlibs.plume.utilreferences resolve correctly through the catalog.Also applies to: 10-10
framework/build.gradle (1)
38-67: All framework dependencies correctly migrated to catalog.Ten dependency references have been properly converted and all catalog entries are defined and resolvable.
checker-qual/build.gradle (1)
3-3: Plugin declaration correctly migrated to catalog alias.The biz.aQute.bnd.builder plugin version (7.1.0) is preserved in the catalog and properly referenced via alias.
dataflow/build.gradle (1)
11-11: Dataflow dependencies correctly migrated to catalog.All three dependency references properly resolve through the version catalog, and the
apidesignation for plume-util (reflecting that it's used in the public API) is preserved.Also applies to: 13-13, 15-15
checker/build.gradle (6)
45-46: Verify dependency catalog entries exist.These utility libraries are core dependencies. Confirm the catalog entries
libs.reflection.utilandlibs.plume.utilare defined correctly.
53-56: Verify AutoValue and Lombok catalog entries.Confirm that all four dependencies are correctly defined in the catalog:
libs.auto.value.annotations,libs.auto.value,libs.auto.value.parcel, andlibs.lombok.
64-64: Verify javax.servlet, commons-io, and spark-sql catalog entries.Confirm these three test dependencies are correctly defined in the catalog:
libs.javax.servlet.api,libs.commons.io, andlibs.spark.sql.Also applies to: 66-66, 69-69
71-71: Verify junit catalog entry references correct artifact.Confirm that
libs.junitresolves to the correct JUnit library (likelyjunit:junitwith an appropriate version).
6-6: No issues found—plugin alias is correctly defined and used.The verification confirms the plugin alias
com-gorylenko-gradle-git-propertiesexists in the version catalog and is properly referenced in build.gradle using the correct Gradle convention (hyphens in the catalog key transform to dots in the alias path). The version is correctly maintained in the catalog entry.
59-62: AWS SDK BOM configuration is correctly set up.The catalog properly defines the BOM as a string module entry, and the ec2/kms artifacts intentionally lack versions in the catalog—they will be managed by the BOM imported via
platform(). This pattern aligns with Gradle best practices for managing dependency versions.annotation-file-utilities/build.gradle (1)
23-31: Verify all dependency catalog entries and Guava is annotated version.Confirm: (1) all six catalog entries exist—
libs.options,libs.plume.util,libs.reflection.util,libs.guava,libs.asm, andlibs.junit; (2)libs.guavaresolves to the checker-annotated library (org.checkerframework.annotatedlib:guava); and (3) consistency with identical entries in checker/build.gradle.
mernst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Gradle version catalogs are a way to manage versions of dependencies added in Gradle 7. The version numbers are stored in
gradle/libs.versions.toml. Renovate will update them (https://github.com/renovatebot/renovate/releases/tag/26.18.0). The nice thing about doing it this way is that this enables IDEs to provide autocompletion.I did the conversion mostly automatically using by doing the following:
Add the following to
setting.gradleand then running:
Then carefully review the diffs because it changed a few thing not unrelated to version numbers. (Plus I had to manually change the plugin versions.)