Skip to content
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 Gradle's VersionCatalog for dependencies in a single place #2853

Merged
merged 2 commits into from
Jan 5, 2022

Conversation

simonbasle
Copy link
Member

@simonbasle simonbasle commented Dec 15, 2021

This PR enables the usage of Gradle 7 Version Catalog.

The TOML file is used, in a way that should be compatible with RenovateBot.

The versions contain:

  • a set of baseline versions (replaces equivalents in gradle.properties)
  • direct versions which are used in several places

The remaining versions are directly defined inline in the libraries and plugins
sections.

@simonbasle simonbasle requested a review from a team as a code owner December 15, 2021 17:05
@simonbasle simonbasle added the type/chores A task not related to code (build, formatting, process, ...) label Dec 15, 2021
@simonbasle simonbasle self-assigned this Dec 15, 2021
@simonbasle simonbasle requested a review from a team December 15, 2021 17:05
@simonbasle simonbasle added this to the 3.4.14 milestone Dec 15, 2021
@simonbasle simonbasle changed the title Use Gradle's VersionCatalog for dependencies + update plugin" Use Gradle's VersionCatalog for dependencies in a single place Dec 17, 2021
 - the catalog is defined in toml format (convention file)
 - it uses simplified syntax for most cases
 - it uses version references for baselines (perf and japicmp)
 - it uses version references for plugins
 - it uses version references when a version is shared between multiple
 libraries/plugins
 - it also avoids version ranges and advanced version constraints
 (since RenovateBot cannot parse these)
@simonbasle
Copy link
Member Author

Renovate should understand the basic version and version.ref syntaxes, but doesn't yet support catalogs outside of the default toml file nor does it support version ranges and version constraints. I'll copy the catalog and setup to a test repo and downgrade all versions, in order to validate that Renovate picks up all the necessary updates and doesn't miss anything due to syntax

@simonbasle
Copy link
Member Author

I have validated that all 35 packages (plugins, libraries) are detected by Renovate. There is actually a 36th package (jsr166), but it is pinned and ignored by renovate. The use of the catalog also enables Renovate to detect Kotlin, so I've added a Renovate packageRule to avoid Renovate bumping Kotlin to 1.6.x

@simonbasle simonbasle merged commit 4926eb7 into main Jan 5, 2022
@simonbasle simonbasle deleted the versionsCatalog branch January 5, 2022 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/chores A task not related to code (build, formatting, process, ...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants