From 1ce23ce435d2d91794cc3192b3ae8caa9d24ca22 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Thu, 28 Jul 2022 06:23:11 -0700 Subject: [PATCH] Fix test-manual-e2e on Android/Hermes for New App Template (#34294) Summary: The current `test-manual-e2e.sh` script is broken on Android + Hermes + New App Template. This commit fixes it. Specifically: - There is no need to generate Maven Artifacts for RN Tester, as RN Tester consumes them from source. - There is instead a need to generate Maven Artifacts for New App Template, as they need to be included inside the NPM package. - The `:ReactAndroid:hermes-engine:installArchives` task needs to invoked to also generate the Hermes-engine .aar for bundling. ## Changelog [Internal] - Fix test-manual-e2e on Android/Hermes for New App Template Pull Request resolved: https://github.com/facebook/react-native/pull/34294 Test Plan: I've tested this against the `0.70-stable` branch and I was able to run an App from the New Template properly. Reviewed By: dmitryrykun Differential Revision: D38239238 Pulled By: cortinico fbshipit-source-id: b3d95bad21515b12a91e29147e70ba8323896660 --- scripts/test-manual-e2e.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/test-manual-e2e.sh b/scripts/test-manual-e2e.sh index a98f74b662ac4e..22cd23221aea0c 100755 --- a/scripts/test-manual-e2e.sh +++ b/scripts/test-manual-e2e.sh @@ -33,7 +33,6 @@ selected_vm="" PACKAGE_VERSION="" test_android(){ - generate_maven_artifacts if [ "$1" == "1" ]; then test_android_hermes elif [ "$1" == "2" ]; then @@ -43,7 +42,8 @@ test_android(){ generate_maven_artifacts(){ rm -rf android - ./gradlew :ReactAndroid:installArchives || error "Couldn't generate artifacts" + ./gradlew :ReactAndroid:installArchives || error "Couldn't generate React Native Maven artifacts" + ./gradlew :ReactAndroid:hermes-engine:installArchives || error "Couldn't generate Hermes Engine Maven artifacts" success "Generated artifacts for Maven" } @@ -109,6 +109,10 @@ kill_packagers(){ init_template_app(){ kill_packagers + if [ "$selected_platform" == "1" ]; then + generate_maven_artifacts + fi + PACKAGE_VERSION=$(cat package.json \ | grep version \ | head -1 \