-
Notifications
You must be signed in to change notification settings - Fork 371
Description
Summary
Since the 1.2.88.0
release there have been issues with this plugin resolving to wrong or higher than expected versions when version ranges are involved between 2 plugins. The problem happens when one plugin requests a version range of an Android native module and another plugin requests an exact version of an Android sub-dependency that was defined in it's POM file. Example PluginA requests a version ranged firebase-messaging
and PluginB requests an exact version of play-services-base
. These issues doesn't seem to occur when 2 different plugins are requesting the same exact module. Below are exact cases reproducing this problem.
Issue 1
When the upper bound limit symbol is a closing parentheses )
, a non-existing version is selected.
PluginADependencies.xml
<dependencies>
<androidPackages>
<androidPackage spec="com.google.firebase:firebase-messaging:[10.2.1, 15.1.0)"/>
</androidPackages>
</dependencies>
PluginBDependencies.xml
<dependencies>
<androidPackages>
<androidPackage spec="com.google.android.gms:play-services-base:15.0.1" />
</androidPackages>
</dependencies>
This result in this plugin trying to use com.google.firebase:firebase-messaging: 15.1.0+.
which results in the following error.
Resolve failed due to com.google.firebase:firebase-messaging: 15.1.0+ missing for project :, attempted to use com.google.firebase:firebase-messaging: 15.1.0+, failed due to org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find any version that matches com.google.firebase:firebase-messaging: 15.1.0+.
Versions that do not match:
- 11.0.4
- 11.0.2
- 11.0.1
- 11.0.0
- 10.2.6
- + 30 more
Searched in the following locations:
- https://maven.google.com/com/google/firebase/firebase-messaging/maven-metadata.xml
Older Versions
In version 1.2.87.0 this error does not occur.
Issue 2
Same scenarios as issue 1 above, however using [
instead of )
for upper bounds the the latest version is used instead of keeping under the limit.
PluginADependencies.xml
<dependencies>
<androidPackages>
<androidPackage spec="com.google.firebase:firebase-messaging:[10.2.1, 15.1.0["/>
</androidPackages>
</dependencies>
PluginBDependencies.xml
<dependencies>
<androidPackages>
<androidPackage spec="com.google.android.gms:play-services-base:15.0.1" />
</androidPackages>
</dependencies>
This ends up pulling in com.google.firebase.firebase-messaging-17.3.2.aar
instead of com.google.firebase.firebase-messaging-15.0.2.aar
.
Older Versions
In version 1.2.87.0
this version is correctly resolved to 15.0.2
.
References
This is causing issue #149 as well as OneSignal/OneSignal-Unity-SDK#146