@@ -98,10 +98,13 @@ android {
98
98
defaultConfig {
99
99
minSdkVersion getExtOrIntegerDefault(" minSdkVersion" )
100
100
targetSdkVersion getExtOrIntegerDefault(" targetSdkVersion" )
101
+ < % if (project. arch === " new" || project. arch === " mixed" ) { -% >
101
102
buildConfigField " boolean" , " IS_NEW_ARCHITECTURE_ENABLED" , isNewArchitectureEnabled(). toString()
102
- < % if (project. view && (project . arch === " new " || project . arch === " mixed " ) ) { -% >
103
+ < % if (project. view) { -% >
103
104
buildConfigField " String" , " CODEGEN_MODULE_REGISTRATION" , (isNewArchitectureEnabled() && registrationCompat ? " \" ${ codegenViewModuleName} _registration\" " : " null" )
104
105
< % } -% >
106
+ < % } -% >
107
+
105
108
< % if (project. cpp) { -% >
106
109
externalNativeBuild {
107
110
cmake {
@@ -131,12 +134,14 @@ android {
131
134
< % } -% >
132
135
}
133
136
< % if (project. cpp) { -% >
137
+
134
138
externalNativeBuild {
135
139
cmake {
136
140
path " CMakeLists.txt"
137
141
}
138
142
}
139
143
< % } else if (project. view && (project. arch === " new" || project. arch === " mixed" )) { -% >
144
+
140
145
if (isNewArchitectureEnabled() && registrationCompat) {
141
146
// We configure the NDK build only if you decide to opt-in for the New Architecture.
142
147
externalNativeBuild {
@@ -146,6 +151,13 @@ android {
146
151
}
147
152
}
148
153
< % } -% >
154
+ < % if (project. arch === " new" || project. arch === " mixed" ) { -% >
155
+
156
+ buildFeatures {
157
+ buildConfig true
158
+ }
159
+ < % } -% >
160
+
149
161
buildTypes {
150
162
release {
151
163
minifyEnabled false
@@ -160,8 +172,8 @@ android {
160
172
sourceCompatibility JavaVersion . VERSION_1_8
161
173
targetCompatibility JavaVersion . VERSION_1_8
162
174
}
163
-
164
175
< % if (project. arch === " new" ) { -% >
176
+
165
177
sourceSets {
166
178
main {
167
179
if (isNewArchitectureEnabled()) {
@@ -173,6 +185,7 @@ android {
173
185
}
174
186
}
175
187
< % } else if (project. arch === " mixed" ) { -% >
188
+
176
189
sourceSets {
177
190
main {
178
191
if (isNewArchitectureEnabled()) {
@@ -208,14 +221,16 @@ dependencies {
208
221
< % } -% >
209
222
}
210
223
224
+ < % if (project. arch === " new" || project. arch === " mixed" ) { -% >
211
225
if (isNewArchitectureEnabled()) {
212
226
react {
213
227
jsRootDir = file(" ../src/" )
214
- < % if (project. view && (project . arch === " new " || project . arch === " mixed " ) ) { -% >
228
+ < % if (project. view) { -% >
215
229
libraryName = codegenViewLibraryName
216
230
< % } else { -% >
217
231
libraryName = " <%- project.view ? project.name + 'View' : project.name -%>"
218
232
< % } -% >
219
233
codegenJavaPackageName = " com.<%- project.package -%>"
220
234
}
221
235
}
236
+ < % } -% >
0 commit comments