@@ -23,6 +23,10 @@ def isNewArchitectureEnabled() {
2323 return rootProject. hasProperty(" newArchEnabled" ) && rootProject. getProperty(" newArchEnabled" ) == " true"
2424}
2525
26+ def isFabricEnabled () {
27+ return rootProject. hasProperty(" fabricEnabled" ) && rootProject. getProperty(" fabricEnabled" ) == " true"
28+ }
29+
2630apply plugin : " com.android.library"
2731apply plugin : " kotlin-android"
2832
@@ -64,6 +68,17 @@ android {
6468 minSdkVersion getExtOrIntegerDefault(" minSdkVersion" )
6569 targetSdkVersion getExtOrIntegerDefault(" targetSdkVersion" )
6670
71+ if (isNewArchitectureEnabled()) {
72+ buildConfigField(" boolean" , " IS_NEW_ARCHITECTURE_ENABLED" , " true" )
73+ if (isFabricEnabled()) {
74+ buildConfigField(" boolean" , " IS_FABRIC_ENABLED" , " true" )
75+ } else {
76+ buildConfigField(" boolean" , " IS_FABRIC_ENABLED" , " false" )
77+ }
78+ } else {
79+ buildConfigField(" boolean" , " IS_NEW_ARCHITECTURE_ENABLED" , " false" )
80+ buildConfigField(" boolean" , " IS_FABRIC_ENABLED" , " false" )
81+ }
6782 }
6883
6984 buildTypes {
@@ -80,6 +95,10 @@ android {
8095 sourceCompatibility JavaVersion . VERSION_1_8
8196 targetCompatibility JavaVersion . VERSION_1_8
8297 }
98+
99+ buildFeatures {
100+ buildConfig true
101+ }
83102}
84103
85104repositories {
@@ -97,5 +116,16 @@ dependencies {
97116 implementation " org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version "
98117 api " com.iterable:iterableapi:3.5.2"
99118 // api project(":iterableapi") // links to local android SDK repo rather than by release
119+
120+ if (isNewArchitectureEnabled()) {
121+ implementation project(" :ReactAndroid" )
122+ implementation project(" :ReactCommon" )
123+ implementation project(" :ReactCommon:jsi" )
124+ implementation project(" :ReactCommon:reactnativejni" )
125+ implementation project(" :ReactCommon:reactnativejni:jsi" )
126+ implementation project(" :ReactCommon:reactnativejni:jsc" )
127+ implementation project(" :ReactCommon:reactnativejni:hermes" )
128+ implementation project(" :ReactCommon:reactnativejni:fabricjni" )
129+ }
100130}
101131
0 commit comments