diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 3ee84a4eb..7c61a46b7 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -73,7 +73,7 @@ def enableProguardInReleaseBuilds = true def jscFlavor = 'org.webkit:android-jsc:+' def isNewArchitectureEnabled() { - return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true" + return project.hasProperty("newArchEnabled") && project.getProperty("newArchEnabled") == "true" } logger.warn("Building with newArchEnabled = ${isNewArchitectureEnabled()}...") diff --git a/example/android/gradle.properties b/example/android/gradle.properties index 9afe61598..788b31519 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -27,13 +27,6 @@ android.useAndroidX=true # ./gradlew -PreactNativeArchitectures=x86_64 reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 -# Use this property to enable support to the new architecture. -# This will allow you to use TurboModules and the Fabric render in -# your application. You should enable this flag either if you want -# to write custom TurboModules/Fabric components OR use libraries that -# are providing them. -newArchEnabled=true - # Use this property to enable or disable the Hermes JS engine. # If set to false, you will be using JSC instead. hermesEnabled=true diff --git a/packages/react-native-nitro-modules/android/build.gradle b/packages/react-native-nitro-modules/android/build.gradle index e36e0cde0..5488efe03 100644 --- a/packages/react-native-nitro-modules/android/build.gradle +++ b/packages/react-native-nitro-modules/android/build.gradle @@ -17,7 +17,7 @@ def reactNativeArchitectures() { } def isNewArchitectureEnabled() { - return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true" + return project.hasProperty("newArchEnabled") && project.getProperty("newArchEnabled") == "true" } apply plugin: "com.android.library" diff --git a/packages/react-native-nitro-test-external/android/build.gradle b/packages/react-native-nitro-test-external/android/build.gradle index 546fb8d0c..6f69d8bb1 100644 --- a/packages/react-native-nitro-test-external/android/build.gradle +++ b/packages/react-native-nitro-test-external/android/build.gradle @@ -15,7 +15,7 @@ def reactNativeArchitectures() { } def isNewArchitectureEnabled() { - return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true" + return project.hasProperty("newArchEnabled") && project.getProperty("newArchEnabled") == "true" } apply plugin: "com.android.library" diff --git a/packages/react-native-nitro-test/android/build.gradle b/packages/react-native-nitro-test/android/build.gradle index 766ffc1d8..7c41ea314 100644 --- a/packages/react-native-nitro-test/android/build.gradle +++ b/packages/react-native-nitro-test/android/build.gradle @@ -15,7 +15,7 @@ def reactNativeArchitectures() { } def isNewArchitectureEnabled() { - return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true" + return project.hasProperty("newArchEnabled") && project.getProperty("newArchEnabled") == "true" } apply plugin: "com.android.library" diff --git a/packages/template/android/build.gradle b/packages/template/android/build.gradle index a10f730cd..58025894d 100644 --- a/packages/template/android/build.gradle +++ b/packages/template/android/build.gradle @@ -15,7 +15,7 @@ def reactNativeArchitectures() { } def isNewArchitectureEnabled() { - return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true" + return project.hasProperty("newArchEnabled") && project.getProperty("newArchEnabled") == "true" } apply plugin: "com.android.library"