From 4a8046c6355c98ec41e7a1d4a0d20d8a226a169b Mon Sep 17 00:00:00 2001 From: Siddarth Kumar Date: Tue, 14 May 2024 16:19:33 +0530 Subject: [PATCH] chore: enable new architecture for android --- Makefile | 2 ++ android/gradle.properties | 1 + nix/mobile/android/build.nix | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/Makefile b/Makefile index b9bfb722ee..a46913e907 100644 --- a/Makefile +++ b/Makefile @@ -277,6 +277,8 @@ run-android: export TARGET := android # https://github.com/status-im/status-mobile/issues/18493 run-android: export ORG_GRADLE_PROJECT_hermesEnabled := false run-android: export ORG_GRADLE_PROJECT_universalApk := false +# enabling new architecture requires hermes to be enabled +run-android: export ORG_GRADLE_PROJECT_newArchEnabled := false run-android: ##@run Build Android APK and start it on the device @scripts/run-android.sh diff --git a/android/gradle.properties b/android/gradle.properties index 6d587f756f..c19bae1aba 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -53,6 +53,7 @@ commitHash=unknown # your application. You should enable this flag either if you want # to write custom TurboModules/Fabric components OR use libraries that # are providing them. +# enabling new architecture requires hermes to be enabled newArchEnabled=false # Use this property to enable or disable the Hermes JS engine. diff --git a/nix/mobile/android/build.nix b/nix/mobile/android/build.nix index 303cd92f89..d55ee5f9dd 100644 --- a/nix/mobile/android/build.nix +++ b/nix/mobile/android/build.nix @@ -15,6 +15,8 @@ # Disabled for debug builds to avoid 'maximum call stack exceeded' errors. # https://github.com/status-im/status-mobile/issues/18493 hermesEnabled ? lib.getEnvWithDefault "ORG_GRADLE_PROJECT_hermesEnabled" "true", + # enabling new architecture requires hermes to be enabled + newArchEnabled ? lib.getEnvWithDefault "ORG_GRADLE_PROJECT_newArchEnabled" "true", buildUrl ? lib.getEnvWithDefault "ORG_GRADLE_PROJECT_buildUrl" null, statusGoSrcOverride ? lib.getEnvWithDefault "STATUS_GO_SRC_OVERRIDE" null, reactMetroPort ? lib.getEnvWithDefault "RCT_METRO_PORT" 8081, @@ -91,6 +93,8 @@ in stdenv.mkDerivation rec { ORG_GRADLE_PROJECT_buildUrl = buildUrl; ORG_GRADLE_PROJECT_hermesEnabled = hermesEnabled; ORG_GRADLE_PROJECT_universalApk = universalApk; + # enabling new architecture requires hermes to be enabled + ORG_GRADLE_PROJECT_newArchEnabled = newArchEnabled; # Fix for ERR_OSSL_EVP_UNSUPPORTED error. NODE_OPTIONS = "--openssl-legacy-provider";