From d6befeb42d6bfac646cdcfbdc9e17b27ec8b7f48 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Fri, 22 Nov 2024 18:04:01 +0100 Subject: [PATCH] revert(android): force enable New Architecture from 0.77 (#2324) Latest nightly should now build old architecture again. This reverts commit d3138e991737c5b476922e8b388ae6befcfa245f. --- android/react-native.gradle | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/android/react-native.gradle b/android/react-native.gradle index 6bd732a8e..5d807730e 100644 --- a/android/react-native.gradle +++ b/android/react-native.gradle @@ -36,13 +36,10 @@ ext.isFabricEnabled = { Project project -> } ext.isNewArchitectureEnabled = { Project project -> - def NEW_ARCH_ENABLED = "newArchEnabled" - def SCOPED_NEW_ARCH_ENABLED = "react.newArchEnabled" - - def newArchEnabled = project.findProperty(SCOPED_NEW_ARCH_ENABLED) - ?: project.findProperty(NEW_ARCH_ENABLED) - def version = getPackageVersionNumber("react-native", project.rootDir) + def newArchEnabled = project.findProperty("react.newArchEnabled") + ?: project.findProperty("newArchEnabled") if (newArchEnabled == "true") { + def version = getPackageVersionNumber("react-native", project.rootDir) def isSupported = version == 0 || version >= v(0, 71, 0) if (!isSupported) { throw new GradleException([ @@ -53,13 +50,5 @@ ext.isNewArchitectureEnabled = { Project project -> } return isSupported } - - if (version < v(0, 77, 0)) { - return false - } - - // As of 0.77, New Architecture is assumed on and doesn't build otherwise - project.ext[NEW_ARCH_ENABLED] = "true" - project.ext[SCOPED_NEW_ARCH_ENABLED] = "true" - return true + return false }