1"use strict"; 2Object.defineProperty(exports, "__esModule", { value: true }); 3exports.withBuildProperties = void 0; 4const android_1 = require("./android"); 5const ios_1 = require("./ios"); 6const pluginConfig_1 = require("./pluginConfig"); 7/** 8 * Config plugin allowing customizing native Android and iOS build properties for managed apps. 9 * @param config Expo config for application. 10 * @param props Configuration for the build properties plugin. 11 */ 12const withBuildProperties = (config, props) => { 13 const pluginConfig = (0, pluginConfig_1.validateConfig)(props || {}); 14 config = (0, android_1.withAndroidBuildProperties)(config, pluginConfig); 15 config = (0, android_1.withAndroidProguardRules)(config, pluginConfig); 16 config = (0, android_1.withAndroidCleartextTraffic)(config, pluginConfig); 17 // Assuming `withBuildProperties` could be called multiple times from different config-plugins, 18 // the `withAndroidProguardRules` always appends new rules by default. 19 // That is not ideal if we leave generated contents from previous prebuild there. 20 // The `withAndroidPurgeProguardRulesOnce` is for this purpose and it would only run once in prebuilding phase. 21 // 22 // plugins order matter: the later one would run first 23 config = (0, android_1.withAndroidPurgeProguardRulesOnce)(config); 24 config = (0, android_1.withAndroidFlipper)(config, pluginConfig); 25 config = (0, ios_1.withIosBuildProperties)(config, pluginConfig); 26 config = (0, ios_1.withIosDeploymentTarget)(config, pluginConfig); 27 return config; 28}; 29exports.withBuildProperties = withBuildProperties; 30exports.default = exports.withBuildProperties; 31