Skip to content

Commit

Permalink
revert(android): force enable New Architecture from 0.77 (#2324)
Browse files Browse the repository at this point in the history
Latest nightly should now build old architecture again.

This reverts commit d3138e9.
  • Loading branch information
tido64 authored Nov 22, 2024
1 parent 844a654 commit d6befeb
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions android/react-native.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand All @@ -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
}

0 comments on commit d6befeb

Please sign in to comment.