As of version 15.0.0, the Google Play services libraries are maintained individually, allowing the development teams for each library to ship fixes and enhancements independently and more quickly. You can track the latest releases for Google Play services and Firebase .
Strict version matching
A version of one library might be incompatible with a specific version of another library. To help handle this situation, several Gradle plugins provide guidance for these version mismatches. The logic in these plugins is similar to the logic in a failOnVersionConflict() rule for a ResolutionStrategy that's associated with Google Play services and Firebase dependencies.
Google services plugin
افزونهی Google Services Gradle نسخههای سازگار سرویسهای Google Play و کتابخانههای Firebase را بررسی میکند.
Standalone version matcher plugin
If you're not using the Google Services plugin, but you still want strict version checking of your dependencies, you can apply the strict-version-matcher-plugin . You can view this plugin's code on GitHub.
قطعه کد زیر نحوه اضافه کردن افزونه Gradle را نشان میدهد:
کاتلین DSL
ساخت.gradle.kts
plugins { id("com.google.android.gms.strict-version-matcher-plugin") }
گرووی دیاسال
ساخت.gradle
apply plugin: 'com.google.android.gms.strict-version-matcher-plugin'
برای استفاده از این افزونه، باید موارد زیر را که از مخزن Maven گوگل دریافت کردهاید، به classpath اسکریپت ساخت خود اضافه کنید:
کاتلین DSL
ساخت.gradle.kts
classpath("com.google.android.gms:strict-version-matcher-plugin:1.2.4")
گرووی دیاسال
ساخت.gradle
classpath 'com.google.android.gms:strict-version-matcher-plugin:1.2.4'