GitHub
npm
expo-build-properties
is a config plugin configuring the native build properties
of your android/gradle.properties and ios/Podfile.properties.json directories during Prebuild.
This config plugin configures how Prebuild command generates the native android and ios folders and therefore cannot be used with projects that don't runnpx expo prebuild
(bare projects).
Android Device | Android Emulator | iOS Device | iOS Simulator | Web |
---|---|---|---|---|
-
npx expo install expo-build-properties
{
"expo": {
"plugins": [
[
"expo-build-properties",
{
"android": {
"compileSdkVersion": 31,
"targetSdkVersion": 31,
"buildToolsVersion": "31.0.0"
},
"ios": {
"deploymentTarget": "13.0"
}
}
]
]
}
}
export default {
expo: {
plugins: [
[
'expo-build-properties',
{
android: {
compileSdkVersion: 31,
targetSdkVersion: 31,
buildToolsVersion: '31.0.0',
},
ios: {
deploymentTarget: '13.0',
},
},
],
],
},
};
PluginConfigType
interface represents currently available configuration properties.
BuildProperties.withBuildProperties(config, props)
Name | Type | Description |
---|---|---|
config | ExpoConfig | Expo config for application. |
props | PluginConfigType | Configuration for the build properties plugin. |
Config plugin allowing customizing native Android and iOS build properties for managed apps.
Returns
PluginConfigType
Interface representing base build properties configuration.
PluginConfigType Properties
Name | Type | Description |
---|---|---|
android (optional) | PluginConfigTypeAndroid | Only for: Android Interface representing available configuration for Android native build properties. |
ios (optional) | PluginConfigTypeIos | Only for: iOS Interface representing available configuration for iOS native build properties. |
PluginConfigTypeAndroid
Interface representing available configuration for Android native build properties.
PluginConfigTypeAndroid Properties
Name | Type | Description |
---|---|---|
buildToolsVersion (optional) | string | Override the default |
compileSdkVersion (optional) | number | Override the default |
enableProguardInReleaseBuilds (optional) | boolean | Enable Proguard or R8 in release builds to obfuscate Java code and reduce app size. |
enableShrinkResourcesInReleaseBuilds (optional) | boolean | Enable |
extraProguardRules (optional) | string | Append custom Proguard rules to android/app/proguard-rules.pro. |
flipper (optional) | string | By default, Flipper is enabled with the version that comes bundled with Use this to change the Flipper version when
running your app on Android. You can set the |
kotlinVersion (optional) | string | Override the Kotlin version used when building the app. |
minSdkVersion (optional) | number | Override the default |
newArchEnabled (optional) | boolean | Enable React Native new architecture for Android platform. |
packagingOptions (optional) | PluginConfigTypeAndroidPackagingOptions | Interface representing available configuration for Android Gradle plugin PackagingOptions. |
targetSdkVersion (optional) | number | Override the default |
PluginConfigTypeAndroidPackagingOptions
Interface representing available configuration for Android Gradle plugin PackagingOptions.
PluginConfigTypeAndroidPackagingOptions Properties
Name | Type | Description |
---|---|---|
doNotStrip (optional) | string[] | Array of patterns for native libraries that should not be stripped of debug symbols. |
exclude (optional) | string[] | Array of patterns for native libraries that should be excluded from being packaged in the APK. |
merge (optional) | string[] | Array of patterns for native libraries where all occurrences are concatenated and packaged in the APK. |
pickFirst (optional) | string[] | Array of patterns for native libraries where only the first occurrence is packaged in the APK. |
PluginConfigTypeIos
Interface representing available configuration for iOS native build properties.
PluginConfigTypeIos Properties
Name | Type | Description |
---|---|---|
deploymentTarget (optional) | string | Override the default iOS "Deployment Target" version in the following projects:
|
flipper (optional) | string | boolean | Enable Flipper when running your app on iOS in
Debug mode. Setting
|
newArchEnabled (optional) | boolean | Enable React Native new architecture for iOS platform. |
useFrameworks (optional) | 'static' | 'dynamic' | Enable
|