littlerobots / version-catalog-update-plugin

Gradle plugin for updating a project version catalog
Apache License 2.0
544 stars 22 forks source link

Version grouping can be more agressive #127

Closed hvisser closed 6 months ago

hvisser commented 6 months ago

Describe the issue When multiple artifacts in the same maven group have the same version, they should be grouped into a version reference if possible. However, this grouping does not always happen if there are artifacts in the same group that have a different version.

Steps to reproduce Given this TOML file:

[libraries]
camerax-camera2 = "androidx.camera:camera-camera2:1.3.1"
camerax-core = "androidx.camera:camera-core:1.3.1"
camerax-lifecycle = "androidx.camera:camera-lifecycle:1.3.1"
camerax-mlkit = "androidx.camera:camera-mlkit-vision:1.4.0-alpha03"
camerax-view = "androidx.camera:camera-view:1.3.1"

Ideally this would create a new version 1.3.1 for all of the androidx.camera artifacts that match this version. But when applying this to a project, there's no grouping because (apparently) the 1.4.0-alpha03 version is picked as the grouping version and since that's only one library, none of the libraries get grouped.