File tree Expand file tree Collapse file tree 4 files changed +32
-2
lines changed Expand file tree Collapse file tree 4 files changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,14 @@ if [[ ${_SEARCH_RESULT} ]]; then
94
94
_PLIST_ENTRY_VALUES+=(" $( jsonBoolToYesNo " $_ANALYTICS_AUTO_COLLECTION " ) " )
95
95
fi
96
96
97
+ # config.perf_auto_collection_enabled
98
+ _PERF_AUTO_COLLECTION=$( getFirebaseJsonKeyValue " $_JSON_OUTPUT_RAW " " perf_auto_collection_enabled" )
99
+ if [[ $_PERF_AUTO_COLLECTION ]]; then
100
+ _PLIST_ENTRY_KEYS+=(" firebase_performance_collection_enabled" )
101
+ _PLIST_ENTRY_TYPES+=(" bool" )
102
+ _PLIST_ENTRY_VALUES+=(" $( jsonBoolToYesNo " $_PERF_AUTO_COLLECTION " ) " )
103
+ fi
104
+
97
105
# config.messaging_auto_init_enabled
98
106
_MESSAGING_AUTO_INIT=$( getFirebaseJsonKeyValue " $_JSON_OUTPUT_RAW " " messaging_auto_init_enabled" )
99
107
if [[ $_MESSAGING_AUTO_INIT ]]; then
Original file line number Diff line number Diff line change @@ -63,9 +63,22 @@ project.ext {
63
63
])
64
64
}
65
65
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(" perf_auto_collection_enabled" , true ) == false ) {
72
+ autoCollectionEnabled = " false"
73
+ }
74
+ }
75
+
66
76
android {
67
77
defaultConfig {
68
78
multiDexEnabled true
79
+ manifestPlaceholders = [
80
+ firebaseJsonAutoCollectionEnabled : autoCollectionEnabled
81
+ ]
69
82
}
70
83
lintOptions {
71
84
disable ' GradleCompatible'
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
- <manifest package =" io.invertase.firebase.perf" />
2
+
3
+ <manifest package =" io.invertase.firebase.perf"
4
+ xmlns : android =" http://schemas.android.com/apk/res/android" >
5
+ <application >
6
+ <meta-data
7
+ android : name =" firebase_performance_collection_enabled"
8
+ android : value =" ${firebaseJsonAutoCollectionEnabled}" />
9
+ </application >
10
+ </manifest >
Original file line number Diff line number Diff line change 17
17
18
18
"analytics_auto_collection_enabled" : true ,
19
19
20
- "TODO_perf_auto_collection_enabled" : true ,
20
+ "perf_auto_collection_enabled" : true ,
21
+
21
22
"TODO_in_app_messaging_auto_collection_enabled" : true ,
22
23
"TODO_database_persistence_enabled" : true ,
23
24
"TODO_firestore_persistence_enabled" : true ,
You can’t perform that action at this time.
0 commit comments