File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11apply plugin : " com.android.library"
22
3+ def isNewArchitectureEnabled () {
4+ // To opt-in for the New Architecture, you can either:
5+ // - Set `newArchEnabled` to true inside the `gradle.properties` file
6+ // - Invoke gradle with `-newArchEnabled=true`
7+ // - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
8+ return project. hasProperty(" newArchEnabled" ) && project. newArchEnabled == " true"
9+ }
10+
11+ def IS_NEW_ARCHITECTURE_ENABLED = isNewArchitectureEnabled()
12+
13+ if (IS_NEW_ARCHITECTURE_ENABLED ) {
14+ apply plugin : " com.facebook.react"
15+ }
16+
317def DEFAULT_COMPILE_SDK_VERSION = 26
418def DEFAULT_BUILD_TOOLS_VERSION = " 26.0.3"
519def DEFAULT_TARGET_SDK_VERSION = 26
@@ -16,6 +30,7 @@ android {
1630 targetSdkVersion rootProject. hasProperty(' targetSdkVersion' ) ? rootProject. targetSdkVersion : DEFAULT_TARGET_SDK_VERSION
1731 versionCode 1
1832 versionName " 1.0"
33+ buildConfigField " boolean" , " IS_NEW_ARCHITECTURE_ENABLED" , IS_NEW_ARCHITECTURE_ENABLED . toString()
1934 }
2035
2136 lintOptions {
You can’t perform that action at this time.
0 commit comments