chore: use gradle version catalogs as a single source of truth for dependency#1986
chore: use gradle version catalogs as a single source of truth for dependency#1986baywet merged 4 commits intomicrosoft:mainfrom exoego:catalog
Conversation
|
@microsoft-github-policy-service agree |
|
This pull request has conflicting changes, the author must resolve the conflicts before this pull request can be merged. |
|
Hi @exoego We're receiving multiple pull requests per dependency update because:
I believe that as long as we don't update the dependabot configuration to contain a single entry, we'll still get multiple PRs per dependency, which will all target the new file you're introducing. What do you think? |
|
I prefer getting multiple PRs per dependency. |
|
Thank you for the additional information. Then, if the intent of this pull request is not to solve the multiple pull requests per dependency, what are you looking to achieve beyond having all the versions at the same place? |
It's not MY intention. This PR just solves #1594 which is kept open since 2024 Sep, so I guessed maintainers have wish to implement it. Another benefit of version catalog is having version variable in There is two examples in this PR
[versions]
okhttp = "4.12.0"
opentelemetry = "1.51.0"
[libraries]
...
com-squareup-okhttp3-logging-interceptor = { group = "com.squareup.okhttp3", name = "logging-interceptor", version.ref = "okhttp" }
com-squareup-okhttp3-mockwebserver = { group = "com.squareup.okhttp3", name = "mockwebserver", version.ref = "okhttp" }
com-squareup-okhttp3-okhttp = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okhttp" }
...
io-opentelemetry-opentelemetry-api = { group = "io.opentelemetry", name = "opentelemetry-api", version.ref = "opentelemetry" }
io-opentelemetry-opentelemetry-context = { group = "io.opentelemetry", name = "opentelemetry-context", version.ref = "opentelemetry" }
|
baywet
left a comment
There was a problem hiding this comment.
Thank you for the additional information.
Even if this dos not reduce the number of PRs, it should make their review faster through reduced duplication and improved readability.
Closes #1594
Move all definition of dependencies into Gradle version catalogs.

This will reduce duplicates of same dependency update in multiple sub projects such as:
Mostly auto-generated by the tool I wrote