File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -36,10 +36,13 @@ ext.isFabricEnabled = { Project project ->
3636}
3737
3838ext. isNewArchitectureEnabled = { Project project ->
39- def newArchEnabled = project. findProperty(" react.newArchEnabled" )
40- ?: project. findProperty(" newArchEnabled" )
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)
4145 if (newArchEnabled == " true" ) {
42- def version = getPackageVersionNumber(" react-native" , project. rootDir)
4346 def isSupported = version == 0 || version >= v(0 , 71 , 0 )
4447 if (! isSupported) {
4548 throw new GradleException ([
@@ -50,5 +53,13 @@ ext.isNewArchitectureEnabled = { Project project ->
5053 }
5154 return isSupported
5255 }
53- return false
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
5465}
You can’t perform that action at this time.
0 commit comments