From 4fa55d13edc950bd6faf7793eb80cdbee72c98fc Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Wed, 13 Sep 2023 06:30:19 -0700 Subject: [PATCH] Unblock `yarn android` on main (#39413) Summary: `yarn android` on main is currently broken due to the CLI attempting to search for the manifest inside the src/androidTest folder. This fixes it by specifying the exact path of the Android Manifest. The fix to the CLI is also pending to prevent the CLI from searching inside test folders. Fix for the CLI is here: - https://github.com/react-native-community/cli/pull/2075 Changelog: [Internal] [Changed] - Unblock `yarn android` on main Reviewed By: huntie Differential Revision: D49190626 --- packages/rn-tester/package.json | 2 +- packages/rn-tester/react-native.config.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/rn-tester/package.json b/packages/rn-tester/package.json index 2adbba48dd380c..d63abf26aab14e 100644 --- a/packages/rn-tester/package.json +++ b/packages/rn-tester/package.json @@ -14,7 +14,7 @@ }, "scripts": { "start": "react-native start", - "android": "react-native run-android --mode HermesDebug --appId 'com.facebook.react.uiapp' --main-activity 'com.facebook.react.uiapp.RNTesterActivity'", + "android": "react-native run-android --mode HermesDebug", "install-android-jsc": "../../gradlew :packages:rn-tester:android:app:installJscDebug", "install-android-hermes": "../../gradlew :packages:rn-tester:android:app:installHermesDebug", "clean-android": "rm -rf android/app/build", diff --git a/packages/rn-tester/react-native.config.js b/packages/rn-tester/react-native.config.js index f88c60aa4a4a6f..449669b10b9171 100644 --- a/packages/rn-tester/react-native.config.js +++ b/packages/rn-tester/react-native.config.js @@ -26,6 +26,10 @@ module.exports = { }, android: { sourceDir: '../../', + // To remove once the CLI fix for manifestPath search path is landed. + manifestPath: + 'packages/rn-tester/android/app/src/main/AndroidManifest.xml', + packageName: 'com.facebook.react.uiapp', }, }, };