إصدارات المكتبة
اعتبارًا من الإصدار 15.0.0، يتم صيانة مكتبات "خدمات Google Play"
بشكلٍ فردي، ما يسمح لفِرق التطوير لكل مكتبة بشحن الإصلاحات
والتحسينات بشكلٍ مستقل وبسرعة أكبر. يمكنك تتبُّع أحدث
إصدارات خدمات Google Play وFirebase.
مطابقة الإصدارات بشكلٍ تام
قد يكون إصدار من مكتبة غير متوافق مع إصدار معيّن من مكتبة أخرى. للمساعدة في التعامل مع هذه الحالة، تقدّم العديد من الإضافات في Gradle توجيهات بشأن عدم تطابق الإصدارات. يشبه المنطق في هذه المكوّنات الإضافية المنطق في قاعدة failOnVersionConflict()
لملف ResolutionStrategy
المرتبط بخدمات Google Play وتبعيات Firebase.
مكوّن إضافي لخدمات Google
يبحث مكوّن Google Services Gradle الإضافي
عن إصدارات متوافقة من "خدمات Google Play" ومكتبات Firebase.
المكوِّن الإضافي لمطابقة الإصدارات المستقلة
إذا كنت لا تستخدم المكوّن الإضافي "خدمات Google"، ولكنك لا تزال تريد فحصًا صارمًا
للإصدارات في التبعيات، يمكنك تطبيق العلامة
[strict-version-matcher-plugin
]. يمكنك الاطّلاع على رمز هذا المكوّن الإضافي على GitHub.
يوضِّح مقتطف الرمز البرمجي التالي كيفية إضافة المكوّن الإضافي Gradle:
لغة Kotlin المحددة من جهة العميل
build.gradle.kts
plugin {
id("com.google.android.gms.strict-version-matcher-plugin")
}
Groovy DSL
build.gradle
apply plugin: 'com.google.android.gms.strict-version-matcher-plugin'
لاستخدام هذا المكوّن الإضافي، عليك أيضًا إضافة ما يلي إلى classpath لملف برمجة التطبيقات (buildscript)، والذي تم الحصول عليه من مستودع Maven
في Google:
لغة Kotlin المحددة من جهة العميل
build.gradle.kts
classpath("com.google.android.gms:strict-version-matcher-plugin:1.2.4")
Groovy DSL
build.gradle
classpath 'com.google.android.gms:strict-version-matcher-plugin:1.2.4'
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-03-11 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-03-11 (حسب التوقيت العالمي المتفَّق عليه)"],[[["Google Play services libraries are now individually maintained, allowing for faster and more frequent updates to individual components."],["Strict version matching is crucial as library versions might be incompatible, and the Google Services Gradle plugin and the standalone strict-version-matcher-plugin help manage these dependencies."],["The `strict-version-matcher-plugin` offers a way to ensure version compatibility for Google Play services and Firebase dependencies, even without using the Google Services plugin."],["To utilize the standalone plugin, you need to add it to your buildscript classpath and apply it in your Gradle file using the provided code snippets."]]],["Google Play services libraries are individually maintained, enabling faster updates. To manage potential version incompatibilities between libraries, Gradle plugins provide guidance. The Google Services Gradle plugin checks for compatible versions of Google Play services and Firebase libraries. Alternatively, the `strict-version-matcher-plugin` offers dependency version checking without the Google Services plugin. To use it you must add the plugin and the `strict-version-matcher-plugin` classpath to your build script.\n"]]