Skip to content

Commit

Permalink
Fix test-manual-e2e on Android/Hermes for New App Template (#34294)
Browse files Browse the repository at this point in the history
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: #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
  • Loading branch information
cortinico authored and facebook-github-bot committed Jul 28, 2022
1 parent 3f50440 commit 1ce23ce
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/test-manual-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ selected_vm=""
PACKAGE_VERSION=""

test_android(){
generate_maven_artifacts
if [ "$1" == "1" ]; then
test_android_hermes
elif [ "$1" == "2" ]; then
Expand All @@ -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"
}
Expand Down Expand Up @@ -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 \
Expand Down

0 comments on commit 1ce23ce

Please sign in to comment.