feat(react-native-webrtc): add config mod for Android minSdkVersion 24

Summary:
react-native-webrtc requires that the Android minSdkVersion is
set to 24.
Related issue on this here and also mentioned on Daily's RN SDK
that has react-native-webrtc as a dependency.

Adds withBuildScriptExtMinimumVersion same as the ffmpeg-kit-react-native
config plugin. Maybe withBuildScriptExtMinimumVersion could be
exported in `config-plugins` package so that it could be used directly.
This commit is contained in:
Thorben Primke authored and evanbacon committed 2022-03-22 11:44:39 -05:00
1 parent eee366bebc
commit ff8b167764
3 files changed
+14 -2

No files matched your search

+4 -1
View File
@@ -59,7 +59,10 @@ export default {
};
```
This plugin will also disable desugaring in the Android `gradle.properties`: `android.enableDexingArtifactTransform.desugaring=false`, and disable iOS Bitcode for "Release" builds (required).
## Important Notes
- For iOS, this plugin disables Bitcodes for all builds (required).
- For Android, this plugin disables desugaring in `gradle.properties`: `android.enableDexingArtifactTransform.desugaring=false` and the [minimum deployment target is changed to `24`](https://github.com/react-native-webrtc/react-native-webrtc/issues/720#issuecomment-552374206) (from `21`) which may break other packages in your app!
## Manual Setup
+4
View File
@@ -21,6 +21,10 @@ const withWebRTC = (config, props = {}) => {
"android.permission.SYSTEM_ALERT_WINDOW",
"android.permission.WAKE_LOCK",
]);
config = config_plugins_1.AndroidConfig.Version.withBuildScriptExtMinimumVersion(config, {
name: "minSdkVersion",
minVersion: 24,
});
config = withDesugaring_1.withDesugaring(config, true);
return config;
};
@@ -31,7 +31,12 @@ const withWebRTC: ConfigPlugin<IOSPermissionsProps | void> = (
"android.permission.SYSTEM_ALERT_WINDOW",
"android.permission.WAKE_LOCK",
]);
config = AndroidConfig.Version.withBuildScriptExtMinimumVersion(config,
{
name: "minSdkVersion",
minVersion: 24,
}
)
config = withDesugaring(config, true);
return config;