Skip to content

Commit

Permalink
Upgrade minsdkversion of RN OSS template to API level 21
Browse files Browse the repository at this point in the history
Summary:
This diff updates the minsdkversion of RN OSS template to API level 21.

Changelog: [Android][Deprecated] Deprecate support of Android API levels 19 and 20. The new minSDK version will be 21+ moving forward.

Reviewed By: fkgozali

Differential Revision: D24379607

fbshipit-source-id: 6801cdcd363065807cdc11006bd94217f914fac7
  • Loading branch information
JoshuaGross authored and facebook-github-bot committed Oct 21, 2020
1 parent 36b0f7d commit a17ff44
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mount -o remount,exec /dev/shm
AVD_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 8 | head -n 1)

# create virtual device
echo no | android create avd -n "$AVD_UUID" -f -t android-19 --abi default/armeabi-v7a
echo no | android create avd -n "$AVD_UUID" -f -t android-21 --abi default/armeabi-v7a

# emulator setup
emulator64-arm -avd $AVD_UUID -no-skin -no-audio -no-window -no-boot-anim &
Expand Down
2 changes: 1 addition & 1 deletion .circleci/Dockerfiles/scripts/run-ci-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function e2e_suite() {

# create virtual device
if ! android list avd | grep "$AVD_UUID" > /dev/null; then
echo no | android create avd -n "$AVD_UUID" -f -t android-19 --abi default/armeabi-v7a
echo no | android create avd -n "$AVD_UUID" -f -t android-21 --abi default/armeabi-v7a
fi

# newline at end of adb devices call and first line is headers
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ jobs:
name: Setup Android SDKs
command: |
sdkmanager --licenses
sdkmanager "system-images;android-19;google_apis;armeabi-v7a"
sdkmanager "system-images;android-21;google_apis;armeabi-v7a"
sdkmanager "platforms;android-%ANDROID_BUILD_VERSION%"
sdkmanager "build-tools;%ANDROID_TOOLS_VERSION%"
sdkmanager "add-ons;addon-google_apis-google-23"
Expand Down
2 changes: 1 addition & 1 deletion ReactAndroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ android {
}

defaultConfig {
minSdkVersion(19)
minSdkVersion(21)
targetSdkVersion(28)
versionCode(1)
versionName("1.0")
Expand Down
2 changes: 1 addition & 1 deletion ReactAndroid/src/main/jni/Application.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
APP_BUILD_SCRIPT := Android.mk

APP_ABI := armeabi-v7a x86 arm64-v8a x86_64
APP_PLATFORM := android-16
APP_PLATFORM := android-21

APP_MK_DIR := $(dir $(lastword $(MAKEFILE_LIST)))

Expand Down
4 changes: 2 additions & 2 deletions packages/rn-tester/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ android {

defaultConfig {
applicationId "com.facebook.react.uiapp"
minSdkVersion 19
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.0"
Expand Down Expand Up @@ -250,7 +250,7 @@ if (enableCodegen) {
externalNativeBuild {
ndkBuild {
abiFilters "armeabi-v7a", "x86", "x86_64", "arm64-v8a"
arguments "APP_PLATFORM=android-16",
arguments "APP_PLATFORM=android-21",
"APP_STL=c++_shared",
"NDK_TOOLCHAIN_VERSION=clang",
// The following paths assume building React Native from source.
Expand Down
2 changes: 1 addition & 1 deletion template/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
buildscript {
ext {
buildToolsVersion = "29.0.3"
minSdkVersion = 19
minSdkVersion = 21
compileSdkVersion = 29
targetSdkVersion = 29
ndkVersion = "20.1.5948944"
Expand Down

1 comment on commit a17ff44

@Desintegrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it mean we should update "React Native apps may target iOS 10.0 and Android 4.1 (API 16) or newer" text from readme?

Please sign in to comment.