Closed cgwyllie closed 7 months ago
@cgwyllie were you able to resolve this?
@wfhm we were unable to resolve this directly. Our solution was to declare an up-to-date compileOnly dependency, and then have consumers use the Firebase BoM package to delcare the version of the library they want to use at runtime.
Describe the bug
Applying the google-services-plugin results in an unexpected error when including a dependency that in turn expresses another dependency using a range of versions.
For example:
app -> kumulos-android-debug:11.7.0 -> firebase-messaging:[19.0.0, 22.99.99]
When the google services plugin is applied, the following build error is produced:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The version check should pass because the specific version resolved through BoM in the app project is 22.0.0, which is covered by the supported range of the Kumulos library [19.0.0, 22.99.99].
Desktop (please complete the following information):
Additional context
Perhaps we have misunderstood something about how to declare dependencies, but according to the gradle spec, it seems valid for us to express a range of supported FCM versions in our library. https://docs.gradle.org/current/userguide/single_versions.html
The relevant code doing version checking appears to be: https://github.com/google/play-services-plugins/blob/3f2750e577135a97115db74ef583b20136f1df29/strict-version-matcher-plugin/src/main/java/com/google/android/gms/dependencies/VersionEvaluation.kt#L14-L27
This code mentions handling version ranges, but it then also treats anything with
[]
as a specific version if strict matching is enabled. This seems like a small logic error, although we don't understand enough about the context of the plugin to say for sure.I'm one of the maintainers of the Kumulos library so we can make any necessary changes on our side if we've made a mistake declaring supported ranges.
We'd appreciate any insight / resolution on this topic.
Thanks!