Skip to content

Commit 9726082

Browse files
committed
gradle modification
1 parent 23101ff commit 9726082

1 file changed

Lines changed: 17 additions & 14 deletions

File tree

expo/withAppsFlyerAndroid.js

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
const { 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+
319
module.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;

0 commit comments

Comments
 (0)