Skip to content

Commit d6befeb

Browse files
authored
revert(android): force enable New Architecture from 0.77 (#2324)
Latest nightly should now build old architecture again. This reverts commit d3138e9.
1 parent 844a654 commit d6befeb

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

android/react-native.gradle

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,10 @@ ext.isFabricEnabled = { Project project ->
3636
}
3737

3838
ext.isNewArchitectureEnabled = { Project project ->
39-
def NEW_ARCH_ENABLED = "newArchEnabled"
40-
def SCOPED_NEW_ARCH_ENABLED = "react.newArchEnabled"
41-
42-
def newArchEnabled = project.findProperty(SCOPED_NEW_ARCH_ENABLED)
43-
?: project.findProperty(NEW_ARCH_ENABLED)
44-
def version = getPackageVersionNumber("react-native", project.rootDir)
39+
def newArchEnabled = project.findProperty("react.newArchEnabled")
40+
?: project.findProperty("newArchEnabled")
4541
if (newArchEnabled == "true") {
42+
def version = getPackageVersionNumber("react-native", project.rootDir)
4643
def isSupported = version == 0 || version >= v(0, 71, 0)
4744
if (!isSupported) {
4845
throw new GradleException([
@@ -53,13 +50,5 @@ ext.isNewArchitectureEnabled = { Project project ->
5350
}
5451
return isSupported
5552
}
56-
57-
if (version < v(0, 77, 0)) {
58-
return false
59-
}
60-
61-
// As of 0.77, New Architecture is assumed on and doesn't build otherwise
62-
project.ext[NEW_ARCH_ENABLED] = "true"
63-
project.ext[SCOPED_NEW_ARCH_ENABLED] = "true"
64-
return true
53+
return false
6554
}

0 commit comments

Comments
 (0)