From 394486eec584a37920dad447a6c1d0ae24d225fc Mon Sep 17 00:00:00 2001 From: Oleksandr Melnykov Date: Tue, 8 Nov 2022 19:12:02 -0800 Subject: [PATCH] Bump OSS Android build to SDK 33 (#35196) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/35196 Changelog: [Android][Changed] - Bump Android compile and target SDK to 33 Reviewed By: cortinico Differential Revision: D41007003 fbshipit-source-id: e7866107fdcfafa778faa6c7f31835b8dd15647a --- .circleci/Dockerfiles/Dockerfile.android | 2 +- .circleci/config.yml | 6 +++--- ReactAndroid/build.gradle | 6 +++--- package.json | 2 +- packages/rn-tester/android/app/build.gradle | 6 +++--- scripts/.tests.env | 6 +++--- template/android/build.gradle | 6 +++--- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.circleci/Dockerfiles/Dockerfile.android b/.circleci/Dockerfiles/Dockerfile.android index ab2752fdac9439..a4bdb0cbd0d2c8 100644 --- a/.circleci/Dockerfiles/Dockerfile.android +++ b/.circleci/Dockerfiles/Dockerfile.android @@ -14,7 +14,7 @@ # and build a Android application that can be used to run the # tests specified in the scripts/ directory. # -FROM reactnativecommunity/react-native-android:6.0 +FROM reactnativecommunity/react-native-android:6.1 LABEL Description="React Native Android Test Image" LABEL maintainer="Héctor Ramos " diff --git a/.circleci/config.yml b/.circleci/config.yml index eff5a5a9467486..f5c4881dbc1a61 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -102,7 +102,7 @@ executors: reactnativeandroid: <<: *defaults docker: - - image: reactnativecommunity/react-native-android:6.0 + - image: reactnativecommunity/react-native-android:6.1 resource_class: "xlarge" environment: - TERM: "dumb" @@ -964,8 +964,8 @@ jobs: environment: - ANDROID_HOME: "C:\\Android\\android-sdk" - ANDROID_NDK: "C:\\Android\\android-sdk\\ndk\\20.1.5948944" - - ANDROID_BUILD_VERSION: 31 - - ANDROID_TOOLS_VERSION: 31.0.0 + - ANDROID_BUILD_VERSION: 33 + - ANDROID_TOOLS_VERSION: 33.0.0 - GRADLE_OPTS: -Dorg.gradle.daemon=false steps: - checkout_code_with_cache diff --git a/ReactAndroid/build.gradle b/ReactAndroid/build.gradle index ac4611161cf7ec..b9be2a80de9252 100644 --- a/ReactAndroid/build.gradle +++ b/ReactAndroid/build.gradle @@ -363,8 +363,8 @@ task installArchives { } android { - buildToolsVersion = "31.0.0" - compileSdkVersion 31 + buildToolsVersion = "33.0.0" + compileSdkVersion 33 // Used to override the NDK path/version on internal CI or by allowing // users to customize the NDK path/version from their root project (e.g. for M1 support) @@ -377,7 +377,7 @@ android { defaultConfig { minSdkVersion(21) - targetSdkVersion(31) + targetSdkVersion(33) versionCode(1) versionName("1.0") diff --git a/package.json b/package.json index 618104ad75e7c3..6c6db98aaf4f90 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "prettier": "prettier --write \"./**/*.{js,md,yml,ts,tsx}\"", "format-check": "prettier --list-different \"./**/*.{js,md,yml,ts,tsx}\"", "update-lock": "npx yarn-deduplicate", - "docker-setup-android": "docker pull reactnativecommunity/react-native-android:6.0", + "docker-setup-android": "docker pull reactnativecommunity/react-native-android:6.1", "docker-build-android": "docker build -t reactnativeci/android -f .circleci/Dockerfiles/Dockerfile.android .", "test-android-run-instrumentation": "docker run --cap-add=SYS_ADMIN -it reactnativeci/android bash .circleci/Dockerfiles/scripts/run-android-docker-instrumentation-tests.sh", "test-android-run-unit": "docker run --cap-add=SYS_ADMIN -it reactnativeci/android bash .circleci/Dockerfiles/scripts/run-android-docker-unit-tests.sh", diff --git a/packages/rn-tester/android/app/build.gradle b/packages/rn-tester/android/app/build.gradle index 4e3ca30c3855d1..bbe757547912ff 100644 --- a/packages/rn-tester/android/app/build.gradle +++ b/packages/rn-tester/android/app/build.gradle @@ -86,8 +86,8 @@ def reactNativeArchitectures() { } android { - buildToolsVersion = "31.0.0" - compileSdkVersion 31 + buildToolsVersion = "33.0.0" + compileSdkVersion 33 namespace "com.facebook.react.uiapp" // Used to override the NDK path/version on internal CI or by allowing @@ -114,7 +114,7 @@ android { defaultConfig { applicationId "com.facebook.react.uiapp" minSdkVersion 21 - targetSdkVersion 31 + targetSdkVersion 33 versionCode 1 versionName "1.0" testBuildType System.getProperty('testBuildType', 'debug') // This will later be used to control the test apk build type diff --git a/scripts/.tests.env b/scripts/.tests.env index c9316493c15db8..1220edfc8c3747 100644 --- a/scripts/.tests.env +++ b/scripts/.tests.env @@ -4,15 +4,15 @@ ## ANDROID ## # Android SDK Build Tools revision -export ANDROID_SDK_BUILD_TOOLS_REVISION=31.0.0 +export ANDROID_SDK_BUILD_TOOLS_REVISION=33.0.0 # Android API Level we build with -export ANDROID_SDK_BUILD_API_LEVEL="31" +export ANDROID_SDK_BUILD_API_LEVEL="33" # Google APIs for Android level export ANDROID_GOOGLE_API_LEVEL="23" # Minimum Android API SDK Level we target export ANDROID_SDK_MINIMUM_API_LEVEL="21" # Target API SDK level to build for -export ANDROID_SDK_TARGET_API_LEVEL="31" +export ANDROID_SDK_TARGET_API_LEVEL="33" # Android Image SDK level to install on the emulator export ANDROID_SYSTEM_IMAGE_API_LEVEL="21" diff --git a/template/android/build.gradle b/template/android/build.gradle index c9a672214815b5..4631930d4a5c42 100644 --- a/template/android/build.gradle +++ b/template/android/build.gradle @@ -2,10 +2,10 @@ buildscript { ext { - buildToolsVersion = "31.0.0" + buildToolsVersion = "33.0.0" minSdkVersion = 21 - compileSdkVersion = 31 - targetSdkVersion = 31 + compileSdkVersion = 33 + targetSdkVersion = 33 // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP. ndkVersion = "23.1.7779620"