File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11const { withGradleProperties } = require ( '@expo/config-plugins' ) ;
22
3+ function withAppsFlyerGradleProperties ( config ) {
4+ return withGradleProperties ( config , ( config ) => {
5+ const props = config . modResults ;
6+
7+ const alreadySet = props . some ( p => p . key === 'appsflyer.enable_purchase_connector' ) ;
8+ if ( ! alreadySet ) {
9+ props . push ( {
10+ key : 'appsflyer.enable_purchase_connector' ,
11+ value : 'true' ,
12+ } ) ;
13+ }
14+
15+ return config ;
16+ } ) ;
17+ }
18+
319module . exports = function withAppsFlyerAndroid ( config , {
420 shouldUsePurchaseConnector = false
521} = { } ) {
6-
722 if ( shouldUsePurchaseConnector ) {
8- config = withGradleProperties ( config , config => {
9- const props = config . modResults ;
10-
11- const alreadySet = props . some ( p => p . key === 'appsflyer.enable_purchase_connector' ) ;
12- if ( ! alreadySet ) {
13- props . push ( {
14- key : 'appsflyer.enable_purchase_connector' ,
15- value : 'true' ,
16- } ) ;
17- }
18-
19- return config ;
20- } ) ;
23+ config = withAppsFlyerGradleProperties ( config ) ;
2124 }
2225
2326 return config ;
You can’t perform that action at this time.
0 commit comments