Migrate to Gradle Version Catalog#3910
Draft
duanemay wants to merge 5 commits into
Draft
Conversation
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()
Contributor
There was a problem hiding this comment.
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.tomland replaceslibraries.*usages withlibs.*across subprojects. - Removes
dependencies.gradleand updates rootbuild.gradlebuildscript/classpath and BOM import to use the version catalog. - Updates
model/build_properties.gradlebuildscript 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.*. |
Restore a comment on cryptacular Fix selenium issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Version catalogs offer several advantages:
✅ 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
From Gradle:
https://docs.gradle.org/current/userguide/version_catalogs.html