Skip to content

Manage dependencies with a version catalog#727

Merged
pm47 merged 3 commits intomasterfrom
version-catalog
Nov 27, 2024
Merged

Manage dependencies with a version catalog#727
pm47 merged 3 commits intomasterfrom
version-catalog

Conversation

@pm47
Copy link
Member

@pm47 pm47 commented Nov 13, 2024

Version catalog is the best practice for managing dependencies. It makes it easier to track and update versions, and allows to centralize dependencies in a multi-module context. It is an alternative to the buildSrc workaround used in some of our projects.

This PR does not update libraries versions.

Each commit offers an alternative approach:
a) define the version catalog in settings.gradle
b) define the version catalog in libs.versions.toml
c) only manage versions (not full dependencies) in the version catalog

Option c) has my preference because we get all the benefit of centralizing versions, but we don't really need to define all dependencies in the version catalog if they are not used by several modules.

@pm47 pm47 requested a review from dpad85 November 13, 2024 13:14
Copy link
Member

@dpad85 dpad85 left a comment

Choose a reason for hiding this comment

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

I also prefer option c).

  • option b) is less readable, because 1) we can't easily parse which dependency is used by which target by just reading the build.gradle.kts file ; 2) the toml file is very busy.
  • option a) is the same, but somewhat worse since the data are put in the settings file.

@pm47 pm47 requested a review from t-bast November 27, 2024 09:47
@pm47 pm47 mentioned this pull request Nov 27, 2024
Copy link
Member

@t-bast t-bast left a comment

Choose a reason for hiding this comment

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

Works on my machine ™️

@pm47 pm47 merged commit 49ed521 into master Nov 27, 2024
@pm47 pm47 deleted the version-catalog branch November 27, 2024 10:15
pm47 added a commit to ACINQ/phoenixd that referenced this pull request Jan 30, 2025
pm47 added a commit to ACINQ/phoenixd that referenced this pull request Feb 4, 2025
pm47 added a commit to ACINQ/phoenixd that referenced this pull request Feb 4, 2025
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.

3 participants