mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/32790 As the name says, I've added a `newArchEnabled` property that can be used to toggle the New Architecture in the new app template. Users can use this to try the New Architecture in their project by either: * Set `newArchEnabled` to true inside the `gradle.properties` file * Invoke gradle with `-PnewArchEnabled=true` * Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true` The Project property will also control if: * ReactNative dependency should be built from source or not. * The NDK should be enabled or not. Please note that this requires RN 0.68.x to run properly (it won't work with 0.67 RCs) or a Nightly version of React Native. Changelog: [Android] [Added] - Setup a `newArchEnabled` property to Opt-in the New Architecture in the template Reviewed By: ShikaSD Differential Revision: D33065373 fbshipit-source-id: 32085f5b071d6243936bafd91425b5b43e5b5101
14 lines
574 B
Groovy
14 lines
574 B
Groovy
rootProject.name = 'HelloWorld'
|
|
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
|
|
include ':app'
|
|
includeBuild('../node_modules/react-native-gradle-plugin') {
|
|
dependencySubstitution {
|
|
substitute(module("com.facebook.react:react")).using(project(":"))
|
|
}
|
|
}
|
|
|
|
if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
|
|
include(":ReactAndroid")
|
|
project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid')
|
|
}
|