diff --git a/.circleci/Dockerfiles/Dockerfile.android b/.circleci/Dockerfiles/Dockerfile.android index 822d7df3d2983a..262c4f8ebfaef8 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:5.1 +FROM reactnativecommunity/react-native-android:5.2 LABEL Description="React Native Android Test Image" LABEL maintainer="Héctor Ramos " diff --git a/.circleci/config.yml b/.circleci/config.yml index 03108bff69efd5..8558724dbeff92 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,7 +36,7 @@ executors: reactnativeandroid: <<: *defaults docker: - - image: reactnativecommunity/react-native-android:5.1 + - image: reactnativecommunity/react-native-android:5.2 resource_class: "large" environment: - TERM: "dumb" @@ -649,8 +649,8 @@ jobs: environment: - ANDROID_HOME: "C:\\Android\\android-sdk" - ANDROID_NDK: "C:\\Android\\android-sdk\\ndk\\20.1.5948944" - - ANDROID_BUILD_VERSION: 30 - - ANDROID_TOOLS_VERSION: 30.0.2 + - ANDROID_BUILD_VERSION: 31 + - ANDROID_TOOLS_VERSION: 31.0.0 - GRADLE_OPTS: -Dorg.gradle.daemon=false - NDK_VERSION: 21.4.7075529 steps: diff --git a/ReactAndroid/build.gradle b/ReactAndroid/build.gradle index 1ce9cce1597f94..4ae7c96a1d8de3 100644 --- a/ReactAndroid/build.gradle +++ b/ReactAndroid/build.gradle @@ -273,7 +273,7 @@ task installArchives { } android { - compileSdkVersion 30 + compileSdkVersion 31 if (project.hasProperty("ANDROID_NDK_VERSION")) { ndkVersion project.property("ANDROID_NDK_VERSION") } @@ -283,7 +283,7 @@ android { defaultConfig { minSdkVersion(21) - targetSdkVersion(28) + targetSdkVersion(31) versionCode(1) versionName("1.0") diff --git a/ReactAndroid/src/androidTest/AndroidManifest.xml b/ReactAndroid/src/androidTest/AndroidManifest.xml index 0ebc7b4768ecba..31552b1abc0ba2 100644 --- a/ReactAndroid/src/androidTest/AndroidManifest.xml +++ b/ReactAndroid/src/androidTest/AndroidManifest.xml @@ -14,6 +14,7 @@ diff --git a/ReactAndroid/src/androidTest/buck-runner/AndroidManifest.xml b/ReactAndroid/src/androidTest/buck-runner/AndroidManifest.xml index 49b4a1fc433c31..5e31d4403b2d20 100644 --- a/ReactAndroid/src/androidTest/buck-runner/AndroidManifest.xml +++ b/ReactAndroid/src/androidTest/buck-runner/AndroidManifest.xml @@ -15,7 +15,8 @@ + android:theme="@style/Theme.ReactNative.AppCompat.Light.NoActionBar.FullScreen" + android:exported="false"> diff --git a/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java b/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java index 30c0840f90dfb8..ea1b53c83ebcf5 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java @@ -58,7 +58,7 @@ * * IMPORTANT: In order for developer support to work correctly it is required that the * manifest of your application contain the following entries: - * {@code } + * {@code } * {@code } */ public final class BridgeDevSupportManager extends DevSupportManagerBase { diff --git a/package.json b/package.json index d6aa7bf9f0204d..1b963d64aec565 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "prettier": "prettier --write \"./**/*.{js,md,yml}\"", "format-check": "prettier --list-different \"./**/*.{js,md,yml}\"", "update-lock": "npx yarn-deduplicate", - "docker-setup-android": "docker pull reactnativecommunity/react-native-android:5.1", + "docker-setup-android": "docker pull reactnativecommunity/react-native-android:5.2", "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/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/ReactPluginTest.kt b/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/ReactPluginTest.kt index 602dd522f40960..1bf7fd5a1c112e 100644 --- a/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/ReactPluginTest.kt +++ b/packages/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/ReactPluginTest.kt @@ -20,7 +20,7 @@ class ReactPluginTest { project.plugins.apply("com.android.application") project.plugins.apply("com.facebook.react") - project.extensions.getByType(AppExtension::class.java).apply { compileSdkVersion(30) } + project.extensions.getByType(AppExtension::class.java).apply { compileSdkVersion(31) } project.extensions.getByType(ReactExtension::class.java).apply { applyAppPlugin.set(true) cliPath.set(".") @@ -36,7 +36,7 @@ class ReactPluginTest { project.plugins.apply("com.android.application") project.plugins.apply("com.facebook.react") - project.extensions.getByType(AppExtension::class.java).apply { compileSdkVersion(30) } + project.extensions.getByType(AppExtension::class.java).apply { compileSdkVersion(31) } project.extensions.getByType(ReactExtension::class.java).apply { applyAppPlugin.set(false) } assertTrue(project.getTasksByName("bundleDebugJsAndAssets", false).isEmpty()) @@ -48,7 +48,7 @@ class ReactPluginTest { project.plugins.apply("com.android.application") project.plugins.apply("com.facebook.react") - project.extensions.getByType(AppExtension::class.java).apply { compileSdkVersion(30) } + project.extensions.getByType(AppExtension::class.java).apply { compileSdkVersion(31) } project.extensions.getByType(ReactExtension::class.java).apply { applyAppPlugin.set(false) } assertTrue(project.getTasksByName("buildCodegenCLI", false).isNotEmpty()) diff --git a/packages/rn-tester/android/app/build.gradle b/packages/rn-tester/android/app/build.gradle index 76322614e7d254..5c3f4a5e770d67 100644 --- a/packages/rn-tester/android/app/build.gradle +++ b/packages/rn-tester/android/app/build.gradle @@ -142,7 +142,7 @@ def reactNativeArchitectures() { } android { - compileSdkVersion 29 + compileSdkVersion 31 if (project.hasProperty("ANDROID_NDK_VERSION")) { ndkVersion project.property("ANDROID_NDK_VERSION") } @@ -163,7 +163,7 @@ android { defaultConfig { applicationId "com.facebook.react.uiapp" minSdkVersion 21 - targetSdkVersion 29 + targetSdkVersion 31 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/packages/rn-tester/android/app/src/main/AndroidManifest.xml b/packages/rn-tester/android/app/src/main/AndroidManifest.xml index 8ee8ae3a352256..f50034f92519f8 100644 --- a/packages/rn-tester/android/app/src/main/AndroidManifest.xml +++ b/packages/rn-tester/android/app/src/main/AndroidManifest.xml @@ -36,7 +36,8 @@ android:label="@string/app_name" android:screenOrientation="fullSensor" android:launchMode="singleTask" - android:configChanges="orientation|screenSize|uiMode" > + android:configChanges="orientation|screenSize|uiMode" + android:exported="true"> @@ -51,7 +52,7 @@ - + - + diff --git a/template/android/app/src/main/AndroidManifest.xml b/template/android/app/src/main/AndroidManifest.xml index 9ec74db36bf5e3..7ba57ca1dc0587 100644 --- a/template/android/app/src/main/AndroidManifest.xml +++ b/template/android/app/src/main/AndroidManifest.xml @@ -15,7 +15,8 @@ android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode" android:launchMode="singleTask" - android:windowSoftInputMode="adjustResize"> + android:windowSoftInputMode="adjustResize" + android:exported="true"> diff --git a/template/android/build.gradle b/template/android/build.gradle index ca9477e6581fe8..76cdf637f69d49 100644 --- a/template/android/build.gradle +++ b/template/android/build.gradle @@ -2,10 +2,10 @@ buildscript { ext { - buildToolsVersion = "30.0.2" + buildToolsVersion = "31.0.0" minSdkVersion = 21 - compileSdkVersion = 30 - targetSdkVersion = 30 + compileSdkVersion = 31 + targetSdkVersion = 31 ndkVersion = "21.4.7075529" } repositories {