Skip to content

Migrate to Gradle Version Catalog#3910

Draft
duanemay wants to merge 5 commits into
developfrom
version_catalog
Draft

Migrate to Gradle Version Catalog#3910
duanemay wants to merge 5 commits into
developfrom
version_catalog

Conversation

@duanemay
Copy link
Copy Markdown
Member

Version catalogs offer several advantages:

  1. IDE Integration & Navigation 🧭
    ✅ Go to Definition: Click on libs.springBoot → jumps directly to the TOML entry
    ✅ Find All Usages: Right-click on a library in TOML → see everywhere it's used across all build files
    ✅ Dead Code Detection: IntelliJ grays out unused dependencies in the TOML file
    ✅ Safe Refactoring: Rename/delete dependencies with confidence using IDE refactoring tools
    ✅ Dependency Cleanup: Easily identify and remove unused dependencies
  2. Gradle Best Practices Alignment ⭐
  3. Standard TOML Format 📝
  4. Foundation for Future Kotlin DSL 🚀

From Gradle:
https://docs.gradle.org/current/userguide/version_catalogs.html

  • Type-Safe Accessors: Gradle generates type-safe accessors for each catalog, enabling autocompletion in IDEs.
  • Centralized Version Management: Each catalog is visible to all projects in a build.
  • Dependency Bundles: Catalogs can group commonly used dependencies into bundles.
  • Version Separation: Catalogs can separate dependency coordinates from version information, allowing shared version declarations.
  • Conflict Resolution: Like regular dependency notation, version catalogs declare requested versions but do not enforce them during conflict resolution.

duanemay added 4 commits May 12, 2026 16:25
For traceability in git history
- Move: dependencies.gradle → gradle/libs.versions.toml
- No content changes - exact same Groovy syntax
This is a direct 1:1 conversion with versions still inline. For traceability in git history

Changes:
- Convert Groovy syntax to TOML in gradle/libs.versions.toml
- Remove apply(from: "dependencies.gradle") from build.gradle
- versions remain inline with libraries
- Gradle plugins included as libraries (to be moved to [plugins] section later)
Restructure TOML into proper version catalog format with extracted versions.

Changes:
- Extract all versions to [versions] section with descriptive names
- Organize [libraries] with logical vendor/purpose groupings:
- Add [plugins] section for Gradle plugins
- Add comments for multi-item sections
Fix the build by updating all .gradle files to use libs.* references.

Changes:
- Replace libraries.* references with libs.* throughout all build files
- Replace versions.* references with libs.versions.*.get()
- Fix TOML format: use { module = "..." } for dependencies without versions
- Fix BOM reference with .get().toString() for mavenBom()
Copilot AI review requested due to automatic review settings May 12, 2026 21:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Migrates the build from a custom dependencies.gradle dependency map to Gradle Version Catalogs (libs.*) to centralize dependency coordinates/versions and improve IDE navigation/refactoring.

Changes:

  • Introduces gradle/libs.versions.toml and replaces libraries.* usages with libs.* across subprojects.
  • Removes dependencies.gradle and updates root build.gradle buildscript/classpath and BOM import to use the version catalog.
  • Updates model/build_properties.gradle buildscript classpath dependency to use the catalog.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
build.gradle Switches buildscript classpath + dependency management BOM import to libs.* and updates version pinning references.
dependencies.gradle Removed legacy dependency/version map in favor of version catalogs.
gradle/libs.versions.toml Adds the version catalog (versions + library aliases, including buildscript classpath artifacts).
metrics-data/build.gradle Migrates Jackson dependencies to libs.*.
model/build.gradle Migrates dependencies to libs.* (note: retains a duplicate nimbusJwt entry).
model/build_properties.gradle Uses libs.eclipseJgit for buildscript classpath.
server/build.gradle Migrates all dependency declarations to libs.*.
statsd/build.gradle Migrates dependencies to libs.*.
statsd-lib/build.gradle Migrates dependencies to libs.*.
uaa/build.gradle Migrates dependencies to libs.*.

Comment thread model/build.gradle
@duanemay duanemay marked this pull request as draft May 12, 2026 21:19
Restore a comment on cryptacular
Fix selenium issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants