File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,9 +63,22 @@ project.ext {
6363 ])
6464}
6565
66+ apply from : file(" ./../../app/android/firebase-json.gradle" )
67+
68+ def autoCollectionEnabled = " true"
69+
70+ if (rootProject. ext && rootProject. ext. firebaseJson) {
71+ if (rootProject. ext. firebaseJson. isFlagEnabled(" analytics_auto_collection_enabled" ) == false ) {
72+ autoCollectionEnabled = " false"
73+ }
74+ }
75+
6676android {
6777 defaultConfig {
6878 multiDexEnabled true
79+ manifestPlaceholders = [
80+ firebaseJsonAutoCollectionEnabled : autoCollectionEnabled
81+ ]
6982 }
7083 lintOptions {
7184 disable ' GradleCompatible'
Original file line number Diff line number Diff line change 55 <uses-permission android : name =" android.permission.ACCESS_NETWORK_STATE" />
66 <uses-permission android : name =" android.permission.INTERNET" />
77 <uses-permission android : name =" android.permission.WAKE_LOCK" />
8+
9+ <application >
10+ <meta-data
11+ android : name =" firebase_analytics_collection_enabled"
12+ android : value =" ${firebaseJsonAutoCollectionEnabled}" />
13+ </application >
814</manifest >
Original file line number Diff line number Diff line change @@ -86,6 +86,14 @@ if [[ ${_SEARCH_RESULT} ]]; then
8686 _PLIST_ENTRY_TYPES+=(" string" )
8787 _PLIST_ENTRY_VALUES+=(" $_JSON_OUTPUT_BASE64 " )
8888
89+ # config.analytics_auto_collection_enabled
90+ _ANALYTICS_AUTO_COLLECTION=$( getFirebaseJsonKeyValue " $_JSON_OUTPUT_RAW " " analytics_auto_collection_enabled" )
91+ if [[ $_ANALYTICS_AUTO_COLLECTION ]]; then
92+ _PLIST_ENTRY_KEYS+=(" FIREBASE_ANALYTICS_COLLECTION_ENABLED" )
93+ _PLIST_ENTRY_TYPES+=(" bool" )
94+ _PLIST_ENTRY_VALUES+=(" $( jsonBoolToYesNo " $_ANALYTICS_AUTO_COLLECTION " ) " )
95+ fi
96+
8997 # config.messaging_auto_init_enabled
9098 _MESSAGING_AUTO_INIT=$( getFirebaseJsonKeyValue " $_JSON_OUTPUT_RAW " " messaging_auto_init_enabled" )
9199 if [[ $_MESSAGING_AUTO_INIT ]]; then
Original file line number Diff line number Diff line change 1515 "messaging_android_notification_color" : " @color/hotpink" ,
1616 "messaging_ios_auto_register_for_remote_messages" : true ,
1717
18- "TODO_analytics_auto_collection_enabled" : true ,
18+ "analytics_auto_collection_enabled" : true ,
19+
1920 "TODO_perf_auto_collection_enabled" : true ,
2021 "TODO_in_app_messaging_auto_collection_enabled" : true ,
2122 "TODO_database_persistence_enabled" : true ,
You can’t perform that action at this time.
0 commit comments