GitHub
npm
expo-build-properties
is a config plugin for managed apps to override the default native build properties. During expo prebuild
, the config plugin will populate build properties from given config to android/gradle.properties
and ios/Podfile.properties.json
.
Android Device | Android Emulator | iOS Device | iOS Simulator | Web |
---|---|---|---|---|
Note: To use this config plugin, your apps must be a managed app and build by either EAS Build or
expo run:[android|ios]
. This package has no effect on project's built with the classicexpo build:android
orexpo build:ios
commands, or when running in the Expo Go app.
-
npx expo install expo-build-properties
{
"expo": {
"plugins": [
[
"expo-build-properties",
{
"android": {
"compileSdkVersion": 31,
"targetSdkVersion": 31,
"buildToolsVersion": "31.0.0"
},
"ios": {
"deploymentTarget": "13.0"
}
}
]
]
}
}
Learn more from PluginConfigType
.
BuildProperties.withBuildProperties(config, props)
Name | Type | Description |
---|---|---|
config | ExpoConfig | ExpoConfig |
props | PluginConfigType | Configuration for the config plugin |
Config plugin to customize native Android or iOS build properties for managed apps
Returns
PluginConfigType
Configuration for expo-build-properties
PluginConfigType Properties
Name | Type | Description |
---|---|---|
android (optional) | PluginConfigTypeAndroid | - |
ios (optional) | PluginConfigTypeIos | - |
PluginConfigTypeAndroid
Config 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 (R8) in release builds to obfuscate Java code and reduce app size |
extraProguardRules (optional) | string | Append custom Proguard rules to |
kotlinVersion (optional) | string | Override the default Kotlin version when building the app |
minSdkVersion (optional) | number | Override the default |
packagingOptions (optional) | PluginConfigTypeAndroidPackagingOptions | AGP PackagingOptions |
targetSdkVersion (optional) | number | Override the default |
PluginConfigTypeAndroidPackagingOptions
AGP PackagingOptions
PluginConfigTypeAndroidPackagingOptions Properties
Name | Type | Description |
---|---|---|
doNotStrip (optional) | string[] | Adds a doNotStrip pattern |
exclude (optional) | string[] | Adds an excluded pattern |
merge (optional) | string[] | Adds a merge pattern |
pickFirst (optional) | string[] | Adds a first-pick pattern |
PluginConfigTypeIos
Config for iOS native build properties
PluginConfigTypeIos Properties
Name | Type | Description |
---|---|---|
deploymentTarget (optional) | string | Override the default iOS Deployment Target version in the following projects:
|
useFrameworks (optional) | 'static' | 'dynamic' | Enable |