From d1e5d451c09c41c08f8750273cf8c019884a0ea7 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 10 May 2022 10:40:11 -0700 Subject: [PATCH 01/14] Remove play-services-base dependency from all except AdMob. --- Android/firebase_dependencies.gradle | 12 ++++-------- .../Android/firebase_dependencies.gradle | 12 ++++-------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/Android/firebase_dependencies.gradle b/Android/firebase_dependencies.gradle index cf1d6579f1..09c28ed41d 100644 --- a/Android/firebase_dependencies.gradle +++ b/Android/firebase_dependencies.gradle @@ -20,25 +20,21 @@ def firebaseDependenciesMap = [ 'admob' : ['com.google.firebase:firebase-ads:19.8.0', 'com.google.firebase:firebase-analytics:21.0.0', 'com.google.android.gms:play-services-base:18.0.1'], - 'analytics' : ['com.google.firebase:firebase-analytics:21.0.0', - 'com.google.android.gms:play-services-base:18.0.1'], + 'analytics' : ['com.google.firebase:firebase-analytics:21.0.0'], 'auth' : ['com.google.firebase:firebase-auth:21.0.3'], 'database' : ['com.google.firebase:firebase-database:20.0.5'], 'dynamic_links' : ['com.google.firebase:firebase-dynamic-links:21.0.1'], 'firestore' : ['com.google.firebase:firebase-firestore:24.1.2'], 'functions' : ['com.google.firebase:firebase-functions:20.1.0'], - 'installations' : ['com.google.firebase:firebase-installations:17.0.1', - 'com.google.android.gms:play-services-base:18.0.1'], + 'installations' : ['com.google.firebase:firebase-installations:17.0.1'], 'invites' : ['com.google.firebase:firebase-invites:17.0.0'], // Messaging has an additional local dependency to include. 'messaging' : ['com.google.firebase:firebase-messaging:23.0.4', 'firebase_cpp_sdk.messaging:messaging_java', 'androidx.core:core:1.6.0-alpha03', - 'com.google.flatbuffers:flatbuffers-java:1.12.0', - 'com.google.android.gms:play-services-base:18.0.1'], + 'com.google.flatbuffers:flatbuffers-java:1.12.0'], 'performance' : ['com.google.firebase:firebase-perf:20.0.6'], - 'remote_config' : ['com.google.firebase:firebase-config:21.1.0', - 'com.google.android.gms:play-services-base:18.0.1'], + 'remote_config' : ['com.google.firebase:firebase-config:21.1.0'], 'storage' : ['com.google.firebase:firebase-storage:20.0.1'], 'testlab' : [] ] diff --git a/release_build_files/Android/firebase_dependencies.gradle b/release_build_files/Android/firebase_dependencies.gradle index a753caa66a..ce091a42e8 100644 --- a/release_build_files/Android/firebase_dependencies.gradle +++ b/release_build_files/Android/firebase_dependencies.gradle @@ -20,25 +20,21 @@ def firebaseDependenciesMap = [ 'admob' : ['com.google.firebase:firebase-ads:19.8.0', 'com.google.firebase:firebase-analytics:21.0.0', 'com.google.android.gms:play-services-base:18.0.1'], - 'analytics' : ['com.google.firebase:firebase-analytics:21.0.0', - 'com.google.android.gms:play-services-base:18.0.1'], + 'analytics' : ['com.google.firebase:firebase-analytics:21.0.0'], 'auth' : ['com.google.firebase:firebase-auth:21.0.3'], 'database' : ['com.google.firebase:firebase-database:20.0.5'], 'dynamic_links' : ['com.google.firebase:firebase-dynamic-links:21.0.1'], 'firestore' : ['com.google.firebase:firebase-firestore:24.1.2'], 'functions' : ['com.google.firebase:firebase-functions:20.1.0'], - 'installations' : ['com.google.firebase:firebase-installations:17.0.1', - 'com.google.android.gms:play-services-base:18.0.1'], + 'installations' : ['com.google.firebase:firebase-installations:17.0.1'], 'invites' : ['com.google.firebase:firebase-invites:17.0.0'], // Messaging has an additional local dependency to include. 'messaging' : ['com.google.firebase:firebase-messaging:23.0.4', 'com.google.firebase.messaging.cpp:firebase_messaging_cpp@aar', 'androidx.core:core:1.6.0-alpha03', - 'com.google.flatbuffers:flatbuffers-java:1.12.0', - 'com.google.android.gms:play-services-base:18.0.1'], + 'com.google.flatbuffers:flatbuffers-java:1.12.0'], 'performance' : ['com.google.firebase:firebase-perf:20.0.6'], - 'remote_config' : ['com.google.firebase:firebase-config:21.1.0', - 'com.google.android.gms:play-services-base:18.0.1'], + 'remote_config' : ['com.google.firebase:firebase-config:21.1.0'], 'storage' : ['com.google.firebase:firebase-storage:20.0.1'], 'testlab' : [] ] From 5af40371667d49742697bf0ed105d99963f030c0 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 10 May 2022 11:32:27 -0700 Subject: [PATCH 02/14] Update Gradle files to use Android BoM instead of individual versions. --- Android/firebase_dependencies.gradle | 34 +++++++++++-------- admob/admob_resources/build.gradle | 3 +- app/app_resources/build.gradle | 3 +- app/google_api_resources/build.gradle | 3 +- app/invites_resources/build.gradle | 5 +-- auth/auth_resources/build.gradle | 5 +-- database/database_resources/build.gradle | 5 +-- firestore/firestore_resources/build.gradle | 5 +-- messaging/messaging_java/build.gradle | 5 +-- .../Android/firebase_dependencies.gradle | 33 ++++++++++-------- storage/storage_resources/build.gradle | 5 +-- 11 files changed, 61 insertions(+), 45 deletions(-) diff --git a/Android/firebase_dependencies.gradle b/Android/firebase_dependencies.gradle index 09c28ed41d..036d141db7 100644 --- a/Android/firebase_dependencies.gradle +++ b/Android/firebase_dependencies.gradle @@ -16,26 +16,25 @@ import org.gradle.util.ConfigureUtil; // A map of library to the dependencies that need to be added for it. def firebaseDependenciesMap = [ - 'app' : ['com.google.firebase:firebase-analytics:21.0.0'], + 'app' : ['com.google.firebase:firebase-analytics], 'admob' : ['com.google.firebase:firebase-ads:19.8.0', - 'com.google.firebase:firebase-analytics:21.0.0', - 'com.google.android.gms:play-services-base:18.0.1'], - 'analytics' : ['com.google.firebase:firebase-analytics:21.0.0'], - 'auth' : ['com.google.firebase:firebase-auth:21.0.3'], - 'database' : ['com.google.firebase:firebase-database:20.0.5'], - 'dynamic_links' : ['com.google.firebase:firebase-dynamic-links:21.0.1'], - 'firestore' : ['com.google.firebase:firebase-firestore:24.1.2'], - 'functions' : ['com.google.firebase:firebase-functions:20.1.0'], - 'installations' : ['com.google.firebase:firebase-installations:17.0.1'], - 'invites' : ['com.google.firebase:firebase-invites:17.0.0'], + 'com.google.firebase:firebase-analytics'], + 'analytics' : ['com.google.firebase:firebase-analytics'], + 'auth' : ['com.google.firebase:firebase-auth'], + 'database' : ['com.google.firebase:firebase-database'], + 'dynamic_links' : ['com.google.firebase:firebase-dynamic-links'], + 'firestore' : ['com.google.firebase:firebase-firestore'], + 'functions' : ['com.google.firebase:firebase-functions'], + 'installations' : ['com.google.firebase:firebase-installations'], + 'invites' : ['com.google.firebase:firebase-invites'], // Messaging has an additional local dependency to include. - 'messaging' : ['com.google.firebase:firebase-messaging:23.0.4', + 'messaging' : ['com.google.firebase:firebase-messaging', 'firebase_cpp_sdk.messaging:messaging_java', 'androidx.core:core:1.6.0-alpha03', 'com.google.flatbuffers:flatbuffers-java:1.12.0'], - 'performance' : ['com.google.firebase:firebase-perf:20.0.6'], - 'remote_config' : ['com.google.firebase:firebase-config:21.1.0'], - 'storage' : ['com.google.firebase:firebase-storage:20.0.1'], + 'performance' : ['com.google.firebase:firebase-perf'], + 'remote_config' : ['com.google.firebase:firebase-config'], + 'storage' : ['com.google.firebase:firebase-storage'], 'testlab' : [] ] @@ -144,6 +143,10 @@ project.afterEvaluate { firebaseCpp.dependencies.libSet.add('app') } + // Add the bill-of-materials + project.dependencies { + implementation platform('com.google.firebase:firebase-bom:30.0.0') + } for (String lib : firebaseCpp.dependencies.libSet) { // Generate and include the proguard file generateAndAddProguard(lib) @@ -161,4 +164,5 @@ project.afterEvaluate { } } } + } diff --git a/admob/admob_resources/build.gradle b/admob/admob_resources/build.gradle index 533dc5d3e3..de599fb709 100644 --- a/admob/admob_resources/build.gradle +++ b/admob/admob_resources/build.gradle @@ -45,7 +45,8 @@ android { } dependencies { - implementation 'com.google.firebase:firebase-analytics:21.0.0' + implementation platform('com.google.firebase:firebase-bom:30.0.0') + implementation 'com.google.firebase:firebase-analytics' implementation 'com.google.firebase:firebase-ads:19.8.0' } diff --git a/app/app_resources/build.gradle b/app/app_resources/build.gradle index 3a883d8eb3..d88d34784c 100644 --- a/app/app_resources/build.gradle +++ b/app/app_resources/build.gradle @@ -50,7 +50,8 @@ android { } dependencies { - implementation 'com.google.firebase:firebase-analytics:21.0.0' + implementation platform('com.google.firebase:firebase-bom:30.0.0') + implementation 'com.google.firebase:firebase-analytics' } afterEvaluate { diff --git a/app/google_api_resources/build.gradle b/app/google_api_resources/build.gradle index 8575019e3b..3893166c00 100644 --- a/app/google_api_resources/build.gradle +++ b/app/google_api_resources/build.gradle @@ -53,7 +53,8 @@ android { } dependencies { - implementation 'com.google.firebase:firebase-analytics:21.0.0' + implementation platform('com.google.firebase:firebase-bom:30.0.0') + implementation 'com.google.firebase:firebase-analytics' implementation 'com.google.android.gms:play-services-base:18.0.1' implementation project(':app:app_resources') } diff --git a/app/invites_resources/build.gradle b/app/invites_resources/build.gradle index 06669d0f1b..3e05de32fe 100644 --- a/app/invites_resources/build.gradle +++ b/app/invites_resources/build.gradle @@ -49,8 +49,9 @@ android { } dependencies { - implementation 'com.google.firebase:firebase-analytics:21.0.0' - implementation 'com.google.firebase:firebase-dynamic-links:21.0.1' + implementation platform('com.google.firebase:firebase-bom:30.0.0') + implementation 'com.google.firebase:firebase-analytics' + implementation 'com.google.firebase:firebase-dynamic-links' implementation project(':app:app_resources') } diff --git a/auth/auth_resources/build.gradle b/auth/auth_resources/build.gradle index 5ce899afb9..780937f5c2 100644 --- a/auth/auth_resources/build.gradle +++ b/auth/auth_resources/build.gradle @@ -49,8 +49,9 @@ android { } dependencies { - implementation 'com.google.firebase:firebase-analytics:21.0.0' - implementation 'com.google.firebase:firebase-auth:21.0.3' + implementation platform('com.google.firebase:firebase-bom:30.0.0') + implementation 'com.google.firebase:firebase-analytics' + implementation 'com.google.firebase:firebase-auth' implementation project(':app:app_resources') } diff --git a/database/database_resources/build.gradle b/database/database_resources/build.gradle index d864bbe1ab..f22e3c22b3 100644 --- a/database/database_resources/build.gradle +++ b/database/database_resources/build.gradle @@ -45,8 +45,9 @@ android { } dependencies { - implementation 'com.google.firebase:firebase-analytics:21.0.0' - implementation 'com.google.firebase:firebase-database:20.0.5' + implementation platform('com.google.firebase:firebase-bom:30.0.0') + implementation 'com.google.firebase:firebase-analytics' + implementation 'com.google.firebase:firebase-database' //implementation project(':app:app_resources') } diff --git a/firestore/firestore_resources/build.gradle b/firestore/firestore_resources/build.gradle index 4a9f0085bf..7543026654 100644 --- a/firestore/firestore_resources/build.gradle +++ b/firestore/firestore_resources/build.gradle @@ -53,8 +53,9 @@ android { } dependencies { - implementation 'com.google.firebase:firebase-analytics:21.0.0' - implementation 'com.google.firebase:firebase-firestore:24.1.2' + implementation platform('com.google.firebase:firebase-bom:30.0.0') + implementation 'com.google.firebase:firebase-analytics' + implementation 'com.google.firebase:firebase-firestore' } afterEvaluate { diff --git a/messaging/messaging_java/build.gradle b/messaging/messaging_java/build.gradle index 975cce2a97..a9e8057859 100644 --- a/messaging/messaging_java/build.gradle +++ b/messaging/messaging_java/build.gradle @@ -55,8 +55,9 @@ android { } dependencies { - implementation 'com.google.firebase:firebase-analytics:21.0.0' - implementation 'com.google.firebase:firebase-messaging:23.0.4' + implementation platform('com.google.firebase:firebase-bom:30.0.0') + implementation 'com.google.firebase:firebase-analytics' + implementation 'com.google.firebase:firebase-messaging' implementation 'com.google.flatbuffers:flatbuffers-java:1.12.0' } diff --git a/release_build_files/Android/firebase_dependencies.gradle b/release_build_files/Android/firebase_dependencies.gradle index ce091a42e8..06a1c0139e 100644 --- a/release_build_files/Android/firebase_dependencies.gradle +++ b/release_build_files/Android/firebase_dependencies.gradle @@ -16,26 +16,25 @@ import org.gradle.util.ConfigureUtil; // A map of library to the dependencies that need to be added for it. def firebaseDependenciesMap = [ - 'app' : ['com.google.firebase:firebase-analytics:21.0.0'], + 'app' : ['com.google.firebase:firebase-analytics'], 'admob' : ['com.google.firebase:firebase-ads:19.8.0', - 'com.google.firebase:firebase-analytics:21.0.0', - 'com.google.android.gms:play-services-base:18.0.1'], - 'analytics' : ['com.google.firebase:firebase-analytics:21.0.0'], - 'auth' : ['com.google.firebase:firebase-auth:21.0.3'], - 'database' : ['com.google.firebase:firebase-database:20.0.5'], - 'dynamic_links' : ['com.google.firebase:firebase-dynamic-links:21.0.1'], - 'firestore' : ['com.google.firebase:firebase-firestore:24.1.2'], - 'functions' : ['com.google.firebase:firebase-functions:20.1.0'], - 'installations' : ['com.google.firebase:firebase-installations:17.0.1'], - 'invites' : ['com.google.firebase:firebase-invites:17.0.0'], + 'com.google.firebase:firebase-analytics'], + 'analytics' : ['com.google.firebase:firebase-analytics'], + 'auth' : ['com.google.firebase:firebase-auth'], + 'database' : ['com.google.firebase:firebase-database'], + 'dynamic_links' : ['com.google.firebase:firebase-dynamic-links'], + 'firestore' : ['com.google.firebase:firebase-firestore'], + 'functions' : ['com.google.firebase:firebase-functions'], + 'installations' : ['com.google.firebase:firebase-installations'], + 'invites' : ['com.google.firebase:firebase-invites'], // Messaging has an additional local dependency to include. - 'messaging' : ['com.google.firebase:firebase-messaging:23.0.4', + 'messaging' : ['com.google.firebase:firebase-messaging', 'com.google.firebase.messaging.cpp:firebase_messaging_cpp@aar', 'androidx.core:core:1.6.0-alpha03', 'com.google.flatbuffers:flatbuffers-java:1.12.0'], - 'performance' : ['com.google.firebase:firebase-perf:20.0.6'], - 'remote_config' : ['com.google.firebase:firebase-config:21.1.0'], - 'storage' : ['com.google.firebase:firebase-storage:20.0.1'], + 'performance' : ['com.google.firebase:firebase-perf'], + 'remote_config' : ['com.google.firebase:firebase-config'], + 'storage' : ['com.google.firebase:firebase-storage'], 'testlab' : [] ] @@ -119,6 +118,10 @@ project.afterEvaluate { firebaseCpp.dependencies.libSet.add('app') } + // Add the bill-of-materials + project.dependencies { + implementation platform('com.google.firebase:firebase-bom:30.0.0') + } for (String lib : firebaseCpp.dependencies.libSet) { // Messaging includes an aar, which to be depended on properly requires // the folder containing it to be added this way. diff --git a/storage/storage_resources/build.gradle b/storage/storage_resources/build.gradle index f40b419b51..c9e1cbc4d0 100644 --- a/storage/storage_resources/build.gradle +++ b/storage/storage_resources/build.gradle @@ -49,8 +49,9 @@ android { } dependencies { - implementation 'com.google.firebase:firebase-analytics:21.0.0' - implementation 'com.google.firebase:firebase-storage:20.0.1' + implementation platform('com.google.firebase:firebase-bom:30.0.0') + implementation 'com.google.firebase:firebase-analytics' + implementation 'com.google.firebase:firebase-storage' } afterEvaluate { From 90e42a1fa203e150b426e805b02788ce83719d37 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 10 May 2022 11:48:06 -0700 Subject: [PATCH 03/14] Update readme for Android BoM. --- release_build_files/readme.md | 60 ++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 26 deletions(-) diff --git a/release_build_files/readme.md b/release_build_files/readme.md index 11f4121073..5a403945cd 100644 --- a/release_build_files/readme.md +++ b/release_build_files/readme.md @@ -78,9 +78,11 @@ distributed as part of the core Firebase Feature | Required Libraries and Gradle Packages -------------------------- | -------------------------------------- +All Firebase SDKs | platform(com.google.firebase:firebase-bom:30.0.0) +| | (Android Bill of Materials) Firebase AdMob | libfirebase_admob.a | | libfirebase_app.a -| | com.google.firebase:firebase-analytics:21.0.0 +| | com.google.firebase:firebase-analytics | | (Maven package) | | com.google.firebase:firebase-ads:19.8.0 | | (Maven package) @@ -88,78 +90,79 @@ Firebase AdMob | libfirebase_admob.a | | (Maven package) Firebase Analytics | libfirebase_analytics.a | | libfirebase_app.a -| | com.google.firebase:firebase-analytics:21.0.0 +| | com.google.firebase:firebase-analytics | | (Maven package) Firebase Authentication | libfirebase_auth.a | | libfirebase_app.a -| | com.google.firebase:firebase-analytics:21.0.0 +| | com.google.firebase:firebase-analytics | | (Maven package) -| | com.google.firebase:firebase-auth:21.0.3 +| | com.google.firebase:firebase-auth | | (Maven package) Firebase Dynamic Links | libfirebase_dynamic_links.a | | libfirebase_app.a -| | com.google.firebase:firebase-analytics:21.0.0 +| | com.google.firebase:firebase-analytics | | (Maven package) -| | com.google.firebase:firebase-dynamic-links:21.0.1 +| | com.google.firebase:firebase-dynamic-links | | (Maven package) Cloud Firestore | libfirebase_firestore.a | | libfirebase_auth.a | | libfirebase_app.a -| | com.google.firebase:firebase-analytics:21.0.0 +| | com.google.firebase:firebase-analytics | | (Maven package) -| | com.google.firebase:firebase-firestore:24.1.2 +| | com.google.firebase:firebase-firestore | | (Maven package) -| | com.google.firebase:firebase-auth:21.0.3 +| | com.google.firebase:firebase-auth | | (Maven package) Firebase Functions | libfirebase_functions | | libfirebase_auth.a (optional) | | libfirebase_app.a -| | com.google.firebase:firebase-analytics:21.0.0 +| | com.google.firebase:firebase-analytics | | (Maven package) -| | com.google.firebase:firebase-functions:20.1.0 +| | com.google.firebase:firebase-functions | | (Maven package) -| | com.google.firebase:firebase-auth:21.0.3 +| | com.google.firebase:firebase-auth | | (Maven package) Firebase Installations | libfirebase_installations.a | | libfirebase_app.a -| | com.google.firebase:firebase-installations:17.0.1 +| | com.google.firebase:firebase-installations | | (Maven package) Firebase Messaging | libfirebase_messaging.a | | libfirebase_app.a -| | com.google.firebase:firebase-analytics:21.0.0 +| | com.google.firebase:firebase-analytics | | (Maven package) -| | com.google.firebase:firebase-messaging:23.0.4 +| | com.google.firebase:firebase-messaging | | (Maven package) | | libmessaging_java.jar (Android service) | | androidx.core:core:1.7.0 (Maven package) Firebase Realtime Database | libfirebase_database.a | | libfirebase_auth.a | | libfirebase_app.a -| | com.google.firebase:firebase-analytics:21.0.0 +| | com.google.firebase:firebase-analytics | | (Maven package) -| | com.google.firebase:firebase-database:20.0.5 +| | com.google.firebase:firebase-database | | (Maven package) -| | com.google.firebase:firebase-auth:21.0.3 +| | com.google.firebase:firebase-auth | | (Maven package) Firebase Remote Config | libfirebase_remote_config.a | | libfirebase_app.a -| | com.google.firebase:firebase-analytics:21.0.0 +| | com.google.firebase:firebase-analytics | | (Maven package) -| | com.google.firebase:firebase-config:21.1.0 +| | com.google.firebase:firebase-config | | (Maven package) Firebase Storage | libfirebase_storage.a | | libfirebase_auth.a | | libfirebase_app.a -| | com.google.firebase:firebase-analytics:21.0.0 +| | com.google.firebase:firebase-analytics | | (Maven package) -| | com.google.firebase:firebase-storage:20.0.1 +| | com.google.firebase:firebase-storage | | (Maven package) -| | com.google.firebase:firebase-auth:21.0.3 +| | com.google.firebase:firebase-auth | | (Maven package) -Important: Each version of the Firebase C++ SDK supports specific Firebase -Android SDK module versions. Please ensure that you reference the correct -version of each Maven package listed above in your Gradle file. +The Firebase C++ SDK uses an Android BoM (Bill of Materials) to specify a single +Firebase Android SDK version number to use, rather than individual versions for +each library. For more information, please see the [Firebase Android SDK +documentation](https://firebase.google.com/docs/android/learn-more#bom). Note: AdMob C++ is not currently compatible with the latest Firebase AdMob Android SDK (20.x.x). Please ensure that you use firebase-ads version 19.8.0 in @@ -572,6 +575,11 @@ workflow use only during the development of your app, not for publicly shipping code. ## Release Notes +### Upcoming release +- Changes + - General (Android): Switched over to Android BoM (Bill of Materials) + for dependency versions. This requires Gradle 5 or higher. + ### 9.0.0 - Changes - General (iOS): Firebase C++ on iOS is now built using Xcode 13.3.1. From 8ea4a8742dd350088a834fc498709653466fe867 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 10 May 2022 12:18:00 -0700 Subject: [PATCH 04/14] Fix formatting --- Android/firebase_dependencies.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Android/firebase_dependencies.gradle b/Android/firebase_dependencies.gradle index 036d141db7..d7108459a0 100644 --- a/Android/firebase_dependencies.gradle +++ b/Android/firebase_dependencies.gradle @@ -16,7 +16,7 @@ import org.gradle.util.ConfigureUtil; // A map of library to the dependencies that need to be added for it. def firebaseDependenciesMap = [ - 'app' : ['com.google.firebase:firebase-analytics], + 'app' : ['com.google.firebase:firebase-analytics'], 'admob' : ['com.google.firebase:firebase-ads:19.8.0', 'com.google.firebase:firebase-analytics'], 'analytics' : ['com.google.firebase:firebase-analytics'], From d3b1c3bb374a830746c304a867b6d0c9fbe352fe Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 10 May 2022 13:14:24 -0700 Subject: [PATCH 05/14] Add note about play-services-base --- release_build_files/readme.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/release_build_files/readme.md b/release_build_files/readme.md index 5a403945cd..8fb8b3f5b2 100644 --- a/release_build_files/readme.md +++ b/release_build_files/readme.md @@ -86,8 +86,6 @@ Firebase AdMob | libfirebase_admob.a | | (Maven package) | | com.google.firebase:firebase-ads:19.8.0 | | (Maven package) -| | com.google.android.gms:play-services-base:18.0.1 -| | (Maven package) Firebase Analytics | libfirebase_analytics.a | | libfirebase_app.a | | com.google.firebase:firebase-analytics @@ -158,12 +156,19 @@ Firebase Storage | libfirebase_storage.a | | (Maven package) | | com.google.firebase:firebase-auth | | (Maven package) +Google Play services module| com.google.android.gms:play-services-base:18.0.1 +| | (Maven package) The Firebase C++ SDK uses an Android BoM (Bill of Materials) to specify a single Firebase Android SDK version number to use, rather than individual versions for each library. For more information, please see the [Firebase Android SDK documentation](https://firebase.google.com/docs/android/learn-more#bom). +If you wish to use the `google_play_services::CheckAvailability` and +`MakeAvailable` functions, or `firebase::ModuleInitializer`, you must include +com.google.android.gms:play-services-base as a dependency as well, as listed +under "Google Play services module" in the table above. + Note: AdMob C++ is not currently compatible with the latest Firebase AdMob Android SDK (20.x.x). Please ensure that you use firebase-ads version 19.8.0 in conjunction with the latest firebase-analytics version to maintain From 7b967e919fbf33f8ecbb08f705b1f5095a0a3cde Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 10 May 2022 22:50:08 -0700 Subject: [PATCH 06/14] Add play-services-base back in for now, will fix in a future PR. --- Android/firebase_dependencies.gradle | 7 +++++-- release_build_files/Android/firebase_dependencies.gradle | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Android/firebase_dependencies.gradle b/Android/firebase_dependencies.gradle index d7108459a0..0c5d15758d 100644 --- a/Android/firebase_dependencies.gradle +++ b/Android/firebase_dependencies.gradle @@ -19,16 +19,19 @@ def firebaseDependenciesMap = [ 'app' : ['com.google.firebase:firebase-analytics'], 'admob' : ['com.google.firebase:firebase-ads:19.8.0', 'com.google.firebase:firebase-analytics'], - 'analytics' : ['com.google.firebase:firebase-analytics'], + 'analytics' : ['com.google.firebase:firebase-analytics', + 'com.google.android.gms:play-services-base:18.0.1'], 'auth' : ['com.google.firebase:firebase-auth'], 'database' : ['com.google.firebase:firebase-database'], 'dynamic_links' : ['com.google.firebase:firebase-dynamic-links'], 'firestore' : ['com.google.firebase:firebase-firestore'], 'functions' : ['com.google.firebase:firebase-functions'], - 'installations' : ['com.google.firebase:firebase-installations'], + 'installations' : ['com.google.firebase:firebase-installations', + 'com.google.android.gms:play-services-base:18.0.1'], 'invites' : ['com.google.firebase:firebase-invites'], // Messaging has an additional local dependency to include. 'messaging' : ['com.google.firebase:firebase-messaging', + 'com.google.android.gms:play-services-base:18.0.1', 'firebase_cpp_sdk.messaging:messaging_java', 'androidx.core:core:1.6.0-alpha03', 'com.google.flatbuffers:flatbuffers-java:1.12.0'], diff --git a/release_build_files/Android/firebase_dependencies.gradle b/release_build_files/Android/firebase_dependencies.gradle index 06a1c0139e..3db4b5692c 100644 --- a/release_build_files/Android/firebase_dependencies.gradle +++ b/release_build_files/Android/firebase_dependencies.gradle @@ -19,16 +19,19 @@ def firebaseDependenciesMap = [ 'app' : ['com.google.firebase:firebase-analytics'], 'admob' : ['com.google.firebase:firebase-ads:19.8.0', 'com.google.firebase:firebase-analytics'], - 'analytics' : ['com.google.firebase:firebase-analytics'], + 'analytics' : ['com.google.firebase:firebase-analytics', + 'com.google.android.gms:play-services-base:18.0.1'], 'auth' : ['com.google.firebase:firebase-auth'], 'database' : ['com.google.firebase:firebase-database'], 'dynamic_links' : ['com.google.firebase:firebase-dynamic-links'], 'firestore' : ['com.google.firebase:firebase-firestore'], 'functions' : ['com.google.firebase:firebase-functions'], - 'installations' : ['com.google.firebase:firebase-installations'], + 'installations' : ['com.google.firebase:firebase-installations', + 'com.google.android.gms:play-services-base:18.0.1'], 'invites' : ['com.google.firebase:firebase-invites'], // Messaging has an additional local dependency to include. 'messaging' : ['com.google.firebase:firebase-messaging', + 'com.google.android.gms:play-services-base:18.0.1', 'com.google.firebase.messaging.cpp:firebase_messaging_cpp@aar', 'androidx.core:core:1.6.0-alpha03', 'com.google.flatbuffers:flatbuffers-java:1.12.0'], From 3f6c9c4e97e6f70956205420dccab5c83d79a215 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 11 May 2022 15:59:35 -0700 Subject: [PATCH 07/14] ADd back to admob too --- Android/firebase_dependencies.gradle | 3 ++- release_build_files/Android/firebase_dependencies.gradle | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Android/firebase_dependencies.gradle b/Android/firebase_dependencies.gradle index 0c5d15758d..664b1a76d6 100644 --- a/Android/firebase_dependencies.gradle +++ b/Android/firebase_dependencies.gradle @@ -18,7 +18,8 @@ import org.gradle.util.ConfigureUtil; def firebaseDependenciesMap = [ 'app' : ['com.google.firebase:firebase-analytics'], 'admob' : ['com.google.firebase:firebase-ads:19.8.0', - 'com.google.firebase:firebase-analytics'], + 'com.google.firebase:firebase-analytics', + 'com.google.android.gms:play-services-base:18.0.1'], 'analytics' : ['com.google.firebase:firebase-analytics', 'com.google.android.gms:play-services-base:18.0.1'], 'auth' : ['com.google.firebase:firebase-auth'], diff --git a/release_build_files/Android/firebase_dependencies.gradle b/release_build_files/Android/firebase_dependencies.gradle index 3db4b5692c..8ace8072cc 100644 --- a/release_build_files/Android/firebase_dependencies.gradle +++ b/release_build_files/Android/firebase_dependencies.gradle @@ -18,7 +18,8 @@ import org.gradle.util.ConfigureUtil; def firebaseDependenciesMap = [ 'app' : ['com.google.firebase:firebase-analytics'], 'admob' : ['com.google.firebase:firebase-ads:19.8.0', - 'com.google.firebase:firebase-analytics'], + 'com.google.firebase:firebase-analytics', + 'com.google.android.gms:play-services-base:18.0.1'], 'analytics' : ['com.google.firebase:firebase-analytics', 'com.google.android.gms:play-services-base:18.0.1'], 'auth' : ['com.google.firebase:firebase-auth'], From 722d9b3f61e9aea9d76fa32b6052c6363752f47d Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Thu, 12 May 2022 10:56:21 -0700 Subject: [PATCH 08/14] Add play-services-base back to RC --- Android/firebase_dependencies.gradle | 5 +++-- release_build_files/Android/firebase_dependencies.gradle | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Android/firebase_dependencies.gradle b/Android/firebase_dependencies.gradle index 664b1a76d6..357340e398 100644 --- a/Android/firebase_dependencies.gradle +++ b/Android/firebase_dependencies.gradle @@ -19,7 +19,7 @@ def firebaseDependenciesMap = [ 'app' : ['com.google.firebase:firebase-analytics'], 'admob' : ['com.google.firebase:firebase-ads:19.8.0', 'com.google.firebase:firebase-analytics', - 'com.google.android.gms:play-services-base:18.0.1'], + 'com.google.android.gms:play-services-base:18.0.1'], 'analytics' : ['com.google.firebase:firebase-analytics', 'com.google.android.gms:play-services-base:18.0.1'], 'auth' : ['com.google.firebase:firebase-auth'], @@ -37,7 +37,8 @@ def firebaseDependenciesMap = [ 'androidx.core:core:1.6.0-alpha03', 'com.google.flatbuffers:flatbuffers-java:1.12.0'], 'performance' : ['com.google.firebase:firebase-perf'], - 'remote_config' : ['com.google.firebase:firebase-config'], + 'remote_config' : ['com.google.firebase:firebase-config', + 'com.google.android.gms:play-services-base:18.0.1'], 'storage' : ['com.google.firebase:firebase-storage'], 'testlab' : [] ] diff --git a/release_build_files/Android/firebase_dependencies.gradle b/release_build_files/Android/firebase_dependencies.gradle index 8ace8072cc..dbdbee9366 100644 --- a/release_build_files/Android/firebase_dependencies.gradle +++ b/release_build_files/Android/firebase_dependencies.gradle @@ -19,7 +19,7 @@ def firebaseDependenciesMap = [ 'app' : ['com.google.firebase:firebase-analytics'], 'admob' : ['com.google.firebase:firebase-ads:19.8.0', 'com.google.firebase:firebase-analytics', - 'com.google.android.gms:play-services-base:18.0.1'], + 'com.google.android.gms:play-services-base:18.0.1'], 'analytics' : ['com.google.firebase:firebase-analytics', 'com.google.android.gms:play-services-base:18.0.1'], 'auth' : ['com.google.firebase:firebase-auth'], @@ -37,7 +37,8 @@ def firebaseDependenciesMap = [ 'androidx.core:core:1.6.0-alpha03', 'com.google.flatbuffers:flatbuffers-java:1.12.0'], 'performance' : ['com.google.firebase:firebase-perf'], - 'remote_config' : ['com.google.firebase:firebase-config'], + 'remote_config' : ['com.google.firebase:firebase-config', + 'com.google.android.gms:play-services-base:18.0.1'], 'storage' : ['com.google.firebase:firebase-storage'], 'testlab' : [] ] From 8a28321c9abe44bdd011d369e686ba53742e3d9e Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Thu, 12 May 2022 14:58:19 -0700 Subject: [PATCH 09/14] Add play_services to separate dependency that can be included with or without app. --- Android/firebase_dependencies.gradle | 20 +++++++++---------- app/integration_test/build.gradle | 2 +- .../Android/firebase_dependencies.gradle | 18 ++++++++--------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Android/firebase_dependencies.gradle b/Android/firebase_dependencies.gradle index 357340e398..8390a5cfae 100644 --- a/Android/firebase_dependencies.gradle +++ b/Android/firebase_dependencies.gradle @@ -17,28 +17,24 @@ import org.gradle.util.ConfigureUtil; // A map of library to the dependencies that need to be added for it. def firebaseDependenciesMap = [ 'app' : ['com.google.firebase:firebase-analytics'], + 'play_services' : ['com.google.android.gms:play-services-base:18.0.1'], 'admob' : ['com.google.firebase:firebase-ads:19.8.0', - 'com.google.firebase:firebase-analytics', - 'com.google.android.gms:play-services-base:18.0.1'], - 'analytics' : ['com.google.firebase:firebase-analytics', - 'com.google.android.gms:play-services-base:18.0.1'], + 'com.google.firebase:firebase-analytics'], + 'analytics' : ['com.google.firebase:firebase-analytics'], 'auth' : ['com.google.firebase:firebase-auth'], 'database' : ['com.google.firebase:firebase-database'], 'dynamic_links' : ['com.google.firebase:firebase-dynamic-links'], 'firestore' : ['com.google.firebase:firebase-firestore'], 'functions' : ['com.google.firebase:firebase-functions'], - 'installations' : ['com.google.firebase:firebase-installations', - 'com.google.android.gms:play-services-base:18.0.1'], + 'installations' : ['com.google.firebase:firebase-installations'], 'invites' : ['com.google.firebase:firebase-invites'], // Messaging has an additional local dependency to include. - 'messaging' : ['com.google.firebase:firebase-messaging', - 'com.google.android.gms:play-services-base:18.0.1', + 'messaging' : ['com.google.firebase:firebase-messaging' 'firebase_cpp_sdk.messaging:messaging_java', 'androidx.core:core:1.6.0-alpha03', 'com.google.flatbuffers:flatbuffers-java:1.12.0'], 'performance' : ['com.google.firebase:firebase-perf'], - 'remote_config' : ['com.google.firebase:firebase-config', - 'com.google.android.gms:play-services-base:18.0.1'], + 'remote_config' : ['com.google.firebase:firebase-config' 'storage' : ['com.google.firebase:firebase-storage'], 'testlab' : [] ] @@ -68,6 +64,10 @@ class Dependencies { def getApp() { libSet.add('app') + libSet.add('play_services') + } + def getAppWithoutPlayServices() { + libSet.add('app') } def getAdmob() { libSet.add('admob') diff --git a/app/integration_test/build.gradle b/app/integration_test/build.gradle index 20c9e2df2e..99edc8dd0f 100644 --- a/app/integration_test/build.gradle +++ b/app/integration_test/build.gradle @@ -76,7 +76,7 @@ android { apply from: "$gradle.firebase_cpp_sdk_dir/Android/firebase_dependencies.gradle" firebaseCpp.dependencies { - app + appWithoutPlayServices } apply plugin: 'com.google.gms.google-services' diff --git a/release_build_files/Android/firebase_dependencies.gradle b/release_build_files/Android/firebase_dependencies.gradle index dbdbee9366..263d1d060a 100644 --- a/release_build_files/Android/firebase_dependencies.gradle +++ b/release_build_files/Android/firebase_dependencies.gradle @@ -17,28 +17,24 @@ import org.gradle.util.ConfigureUtil; // A map of library to the dependencies that need to be added for it. def firebaseDependenciesMap = [ 'app' : ['com.google.firebase:firebase-analytics'], + 'play_services' : ['com.google.android.gms:play-services-base:18.0.1'], 'admob' : ['com.google.firebase:firebase-ads:19.8.0', - 'com.google.firebase:firebase-analytics', - 'com.google.android.gms:play-services-base:18.0.1'], - 'analytics' : ['com.google.firebase:firebase-analytics', - 'com.google.android.gms:play-services-base:18.0.1'], + 'com.google.firebase:firebase-analytics'], + 'analytics' : ['com.google.firebase:firebase-analytics'], 'auth' : ['com.google.firebase:firebase-auth'], 'database' : ['com.google.firebase:firebase-database'], 'dynamic_links' : ['com.google.firebase:firebase-dynamic-links'], 'firestore' : ['com.google.firebase:firebase-firestore'], 'functions' : ['com.google.firebase:firebase-functions'], - 'installations' : ['com.google.firebase:firebase-installations', - 'com.google.android.gms:play-services-base:18.0.1'], + 'installations' : ['com.google.firebase:firebase-installations'], 'invites' : ['com.google.firebase:firebase-invites'], // Messaging has an additional local dependency to include. 'messaging' : ['com.google.firebase:firebase-messaging', - 'com.google.android.gms:play-services-base:18.0.1', 'com.google.firebase.messaging.cpp:firebase_messaging_cpp@aar', 'androidx.core:core:1.6.0-alpha03', 'com.google.flatbuffers:flatbuffers-java:1.12.0'], 'performance' : ['com.google.firebase:firebase-perf'], - 'remote_config' : ['com.google.firebase:firebase-config', - 'com.google.android.gms:play-services-base:18.0.1'], + 'remote_config' : ['com.google.firebase:firebase-config'], 'storage' : ['com.google.firebase:firebase-storage'], 'testlab' : [] ] @@ -49,6 +45,10 @@ class Dependencies { def getApp() { libSet.add('app') + libSet.add('play_services') + } + def getAppWithoutPlayServices() { + libSet.add('app') } def getAdmob() { libSet.add('admob') From 1cf6de64e726eff886b9dec2d63c83fd1229b53d Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Thu, 12 May 2022 14:59:43 -0700 Subject: [PATCH 10/14] Add Play Services by default; if you don't want it, use appWithoutPlayServices. --- Android/firebase_dependencies.gradle | 1 + release_build_files/Android/firebase_dependencies.gradle | 1 + 2 files changed, 2 insertions(+) diff --git a/Android/firebase_dependencies.gradle b/Android/firebase_dependencies.gradle index 8390a5cfae..15cdb6931b 100644 --- a/Android/firebase_dependencies.gradle +++ b/Android/firebase_dependencies.gradle @@ -146,6 +146,7 @@ project.afterEvaluate { // App is required, so add it if it wasn't included. if (!firebaseCpp.dependencies.libSet.contains('app')) { firebaseCpp.dependencies.libSet.add('app') + firebaseCpp.dependencies.libSet.add('play_services') } // Add the bill-of-materials diff --git a/release_build_files/Android/firebase_dependencies.gradle b/release_build_files/Android/firebase_dependencies.gradle index 263d1d060a..6e157da750 100644 --- a/release_build_files/Android/firebase_dependencies.gradle +++ b/release_build_files/Android/firebase_dependencies.gradle @@ -121,6 +121,7 @@ project.afterEvaluate { // App is required, so add it if it wasn't included. if (!firebaseCpp.dependencies.libSet.contains('app')) { firebaseCpp.dependencies.libSet.add('app') + firebaseCpp.dependencies.libSet.add('play_services') } // Add the bill-of-materials From 4a78360513807d8985443d1bc05d348499a910d3 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Thu, 12 May 2022 15:30:47 -0700 Subject: [PATCH 11/14] Fix error, modify readme --- Android/firebase_dependencies.gradle | 2 +- release_build_files/readme.md | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Android/firebase_dependencies.gradle b/Android/firebase_dependencies.gradle index 15cdb6931b..3f1725a04f 100644 --- a/Android/firebase_dependencies.gradle +++ b/Android/firebase_dependencies.gradle @@ -29,7 +29,7 @@ def firebaseDependenciesMap = [ 'installations' : ['com.google.firebase:firebase-installations'], 'invites' : ['com.google.firebase:firebase-invites'], // Messaging has an additional local dependency to include. - 'messaging' : ['com.google.firebase:firebase-messaging' + 'messaging' : ['com.google.firebase:firebase-messaging', 'firebase_cpp_sdk.messaging:messaging_java', 'androidx.core:core:1.6.0-alpha03', 'com.google.flatbuffers:flatbuffers-java:1.12.0'], diff --git a/release_build_files/readme.md b/release_build_files/readme.md index 8fb8b3f5b2..d66193da56 100644 --- a/release_build_files/readme.md +++ b/release_build_files/readme.md @@ -164,15 +164,18 @@ Firebase Android SDK version number to use, rather than individual versions for each library. For more information, please see the [Firebase Android SDK documentation](https://firebase.google.com/docs/android/learn-more#bom). +Note: AdMob C++ is not currently compatible with the latest Firebase AdMob +Android SDK (20.x.x). Please ensure that you use firebase-ads version 19.8.0 in +conjunction with the latest firebase-analytics version to maintain +compatibility. + +### Google Play services module + If you wish to use the `google_play_services::CheckAvailability` and `MakeAvailable` functions, or `firebase::ModuleInitializer`, you must include com.google.android.gms:play-services-base as a dependency as well, as listed under "Google Play services module" in the table above. -Note: AdMob C++ is not currently compatible with the latest Firebase AdMob -Android SDK (20.x.x). Please ensure that you use firebase-ads version 19.8.0 in -conjunction with the latest firebase-analytics version to maintain -compatibility. ### iOS Dependencies From 11f92e4edd89dca79639e9b79935900079f92d0d Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Thu, 12 May 2022 16:33:44 -0700 Subject: [PATCH 12/14] Fix gradle dependencies file --- Android/firebase_dependencies.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Android/firebase_dependencies.gradle b/Android/firebase_dependencies.gradle index 3f1725a04f..c6dfd5ce29 100644 --- a/Android/firebase_dependencies.gradle +++ b/Android/firebase_dependencies.gradle @@ -34,7 +34,7 @@ def firebaseDependenciesMap = [ 'androidx.core:core:1.6.0-alpha03', 'com.google.flatbuffers:flatbuffers-java:1.12.0'], 'performance' : ['com.google.firebase:firebase-perf'], - 'remote_config' : ['com.google.firebase:firebase-config' + 'remote_config' : ['com.google.firebase:firebase-config'], 'storage' : ['com.google.firebase:firebase-storage'], 'testlab' : [] ] From 3d3d49c59413d7f767a670472d781f25ed109dc2 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Fri, 13 May 2022 00:31:27 -0700 Subject: [PATCH 13/14] Fix note --- release_build_files/readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/release_build_files/readme.md b/release_build_files/readme.md index 5364b97d5f..682faf864f 100644 --- a/release_build_files/readme.md +++ b/release_build_files/readme.md @@ -172,10 +172,10 @@ compatibility. #### Gradle dependency file Firebase C++ includes an `Android/firebase_dependencies.gradle` file -that helps you include the correct Android dependencies and native C++ -libraries for each Firebase product. To use it, include the following -in your build.gradle file (you can omit any Firebase products you -aren't using): +that helps you include the correct Android dependencies and Proguard +files for each Firebase product. To use it, include the following in +your build.gradle file (you can omit any Firebase products you aren't +using): ``` apply from: "$gradle.firebase_cpp_sdk_dir/Android/firebase_dependencies.gradle" From 230ed8e94a82125952115f211aace88bfbfdb7b7 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 7 Jun 2022 15:13:10 -0700 Subject: [PATCH 14/14] Update to latest BoM. --- Android/firebase_dependencies.gradle | 2 +- release_build_files/Android/firebase_dependencies.gradle | 2 +- release_build_files/readme.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Android/firebase_dependencies.gradle b/Android/firebase_dependencies.gradle index c6dfd5ce29..e838eec0b3 100644 --- a/Android/firebase_dependencies.gradle +++ b/Android/firebase_dependencies.gradle @@ -151,7 +151,7 @@ project.afterEvaluate { // Add the bill-of-materials project.dependencies { - implementation platform('com.google.firebase:firebase-bom:30.0.0') + implementation platform('com.google.firebase:firebase-bom:30.1.0') } for (String lib : firebaseCpp.dependencies.libSet) { // Generate and include the proguard file diff --git a/release_build_files/Android/firebase_dependencies.gradle b/release_build_files/Android/firebase_dependencies.gradle index 6e157da750..46012c7650 100644 --- a/release_build_files/Android/firebase_dependencies.gradle +++ b/release_build_files/Android/firebase_dependencies.gradle @@ -126,7 +126,7 @@ project.afterEvaluate { // Add the bill-of-materials project.dependencies { - implementation platform('com.google.firebase:firebase-bom:30.0.0') + implementation platform('com.google.firebase:firebase-bom:30.1.0') } for (String lib : firebaseCpp.dependencies.libSet) { // Messaging includes an aar, which to be depended on properly requires diff --git a/release_build_files/readme.md b/release_build_files/readme.md index 3aa93860e7..52c9b8aee2 100644 --- a/release_build_files/readme.md +++ b/release_build_files/readme.md @@ -131,7 +131,7 @@ Firebase Messaging | libfirebase_messaging.a | | com.google.firebase:firebase-messaging | | (Maven package) | | libmessaging_java.jar (Android service) -| | androidx.core:core:1.7.0 (Maven package) +| | androidx.core:core:1.8.0 (Maven package) Firebase Realtime Database | libfirebase_database.a | | libfirebase_auth.a | | libfirebase_app.a