@@ -760,9 +760,11 @@ jobs:
760760 description : The Android build type. Must be one of "Debug", "Release".
761761 type : enum
762762 enum : ["Debug", "Release"]
763- newarchitecture :
764- type : boolean
765- default : false
763+ architecture :
764+ default : " OldArch"
765+ description : Which React Native architecture to use. Must be one of "NewArch", "OldArch".
766+ type : enum
767+ enum : [ "NewArch", "OldArch" ]
766768 jsengine :
767769 default : " Hermes"
768770 description : Which JavaScript engine to use. Must be one of "Hermes", "JSC".
@@ -775,17 +777,6 @@ jobs:
775777 - run_yarn
776778 - attach_workspace :
777779 at : .
778- - when :
779- condition :
780- equal : ["JSC", << parameters.jsengine >>]
781- steps :
782- - run :
783- name : Set enableHermes in buld.gradle to false
784- command : |
785- node ./scripts/set-rn-engine.js -e jsc
786- echo "Hermes disabled."
787- grep enableHermes: template/android/app/build.gradle
788-
789780 - run :
790781 name : Create Android template project
791782 command : |
@@ -796,10 +787,20 @@ jobs:
796787 yarn
797788
798789 - run :
799- name : Build the template application for << parameters.flavor >> with New Architecture set to << parameters.newarchitecture >>, and using the << parameters.jsengine>> JS engine.
790+ name : Build the template application for << parameters.flavor >> with Architecture set to << parameters.architecture >>, and using the << parameters.jsengine>> JS engine.
800791 command : |
801792 cd /tmp/$PROJECT_NAME/android/
802- ./gradlew assemble<< parameters.flavor >> -PnewArchEnabled=<< parameters.newarchitecture >> -PREACT_NATIVE_MAVEN_LOCAL_REPO=/root/react-native/maven-local
793+ if [[ << parameters.architecture >> == "NewArch" ]]; then
794+ export ORG_GRADLE_PROJECT_newArchEnabled=true
795+ else
796+ export ORG_GRADLE_PROJECT_newArchEnabled=false
797+ fi
798+ if [[ << parameters.jsengine >> == "Hermes" ]]; then
799+ export ORG_GRADLE_PROJECT_hermesEnabled=true
800+ else
801+ export ORG_GRADLE_PROJECT_hermesEnabled=false
802+ fi
803+ ./gradlew assemble<< parameters.flavor >> -PREACT_NATIVE_MAVEN_LOCAL_REPO=/root/react-native/maven-local
803804
804805 # -------------------------
805806 # JOBS: Test iOS Template
@@ -1602,7 +1603,7 @@ workflows:
16021603 - build_npm_package
16031604 matrix :
16041605 parameters :
1605- newarchitecture : [true, false ]
1606+ architecture : ["NewArch", "OldArch" ]
16061607 jsengine : ["Hermes", "JSC"]
16071608 flavor : ["Debug", "Release"]
16081609 - test_buck
0 commit comments