File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11module . exports = function withAppsFlyerAndroid ( config , {
2- shouldUsePurchaseConnector = false
3- } = { } ) {
2+ shouldUsePurchaseConnector = false
3+ } = { } ) {
44
5- if ( shouldUsePurchaseConnector ) {
6- if ( ! config . android ) {
7- config . android = { } ;
8- }
9-
10- if ( ! config . android . gradleProperties ) {
11- config . android . gradleProperties = { } ;
5+ if ( shouldUsePurchaseConnector ) {
6+ if ( ! config . android ) {
7+ config . android = { } ;
8+ }
9+
10+ if ( ! config . android . gradleProperties ) {
11+ config . android . gradleProperties = [ ] ;
12+ }
13+
14+ // Prevent duplicates
15+ const existingKeys = config . android . gradleProperties . map ( p => p . key ) ;
16+ if ( ! existingKeys . includes ( 'appsflyer.enable_purchase_connector' ) ) {
17+ config . android . gradleProperties . push ( {
18+ key : 'appsflyer.enable_purchase_connector' ,
19+ value : 'true' ,
20+ } ) ;
21+ }
1222 }
13-
14- // Enable AppsFlyer Purchase Connector for Android
15- config . android . gradleProperties [ 'appsflyer.enable_purchase_connector' ] = 'true' ;
16- }
1723
1824 return config ;
1925} ;
You can’t perform that action at this time.
0 commit comments