From a17ff44adcf003dd4e4ef2301e1f80b77913f712 Mon Sep 17 00:00:00 2001 From: Joshua Gross Date: Tue, 20 Oct 2020 16:58:29 -0700 Subject: [PATCH] Upgrade minsdkversion of RN OSS template to API level 21 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 --- .../scripts/run-android-docker-instrumentation-tests.sh | 2 +- .circleci/Dockerfiles/scripts/run-ci-e2e-tests.sh | 2 +- .circleci/config.yml | 2 +- ReactAndroid/build.gradle | 2 +- ReactAndroid/src/main/jni/Application.mk | 2 +- packages/rn-tester/android/app/build.gradle | 4 ++-- template/android/build.gradle | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.circleci/Dockerfiles/scripts/run-android-docker-instrumentation-tests.sh b/.circleci/Dockerfiles/scripts/run-android-docker-instrumentation-tests.sh index d51860f1d6f037..b6a2427324e7d2 100644 --- a/.circleci/Dockerfiles/scripts/run-android-docker-instrumentation-tests.sh +++ b/.circleci/Dockerfiles/scripts/run-android-docker-instrumentation-tests.sh @@ -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 & diff --git a/.circleci/Dockerfiles/scripts/run-ci-e2e-tests.sh b/.circleci/Dockerfiles/scripts/run-ci-e2e-tests.sh index c930937a593021..3176638424e7e0 100755 --- a/.circleci/Dockerfiles/scripts/run-ci-e2e-tests.sh +++ b/.circleci/Dockerfiles/scripts/run-ci-e2e-tests.sh @@ -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 diff --git a/.circleci/config.yml b/.circleci/config.yml index 9f469a546236e7..d6d762b65775cc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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" diff --git a/ReactAndroid/build.gradle b/ReactAndroid/build.gradle index 1c0a3a0f9b301a..17f7eb735e281e 100644 --- a/ReactAndroid/build.gradle +++ b/ReactAndroid/build.gradle @@ -393,7 +393,7 @@ android { } defaultConfig { - minSdkVersion(19) + minSdkVersion(21) targetSdkVersion(28) versionCode(1) versionName("1.0") diff --git a/ReactAndroid/src/main/jni/Application.mk b/ReactAndroid/src/main/jni/Application.mk index 8bcc6cfa8b8817..f90f6b9418beee 100644 --- a/ReactAndroid/src/main/jni/Application.mk +++ b/ReactAndroid/src/main/jni/Application.mk @@ -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))) diff --git a/packages/rn-tester/android/app/build.gradle b/packages/rn-tester/android/app/build.gradle index 186a325259e28d..e92dc1c6c32133 100644 --- a/packages/rn-tester/android/app/build.gradle +++ b/packages/rn-tester/android/app/build.gradle @@ -147,7 +147,7 @@ android { defaultConfig { applicationId "com.facebook.react.uiapp" - minSdkVersion 19 + minSdkVersion 21 targetSdkVersion 29 versionCode 1 versionName "1.0" @@ -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. diff --git a/template/android/build.gradle b/template/android/build.gradle index 2131e76d46d75d..3f5f8386d34055 100644 --- a/template/android/build.gradle +++ b/template/android/build.gradle @@ -3,7 +3,7 @@ buildscript { ext { buildToolsVersion = "29.0.3" - minSdkVersion = 19 + minSdkVersion = 21 compileSdkVersion = 29 targetSdkVersion = 29 ndkVersion = "20.1.5948944"