littlerobots / version-catalog-update-plugin

Gradle plugin for updating a project version catalog
Apache License 2.0
566 stars 23 forks source link

Figure out how to deal with variants #129

Closed hvisser closed 11 months ago

hvisser commented 11 months ago

Describe the issue For modules that have variants (like kmp modules) Gradle will resolve the platform specific version and return the specific module in the resolved configuration. This leads to an error when the plugin is trying to map the resolved version, and it might also other problems since the original module specified in the TOML file is not actually in any of the resolved configurations.

Steps to reproduce Add a library entry for apollo-api in the version catalog:

[libraries]
apollo-api = "com.apollographql.apollo3:apollo-api:3.8.2"

Stacktrace

* What went wrong:
Execution failed for task ':versionCatalogUpdateStables'.
> Could not resolve all dependencies for configuration ':detachedConfiguration2'.
   > There was an error while evaluating a component selection rule for com.apollographql.apollo3:apollo-api-jvm:3.8.2.
      > Required value was null.

It's probably OK in terms of version to take the version of the redirected artifact, if it is possible to figure out that that redirection/substitution happened.