@@ -130,13 +130,25 @@ def jscFlavor = 'org.webkit:android-jsc-intl:+'
130
130
*/
131
131
def enableHermes = project. ext. react. get(" enableHermes" , false );
132
132
133
+ /**
134
+ * Architectures to build native code for.
135
+ */
136
+ def reactNativeArchitectures () {
137
+ def value = project. getProperties(). get(" reactNativeArchitectures" )
138
+ return value ? value. split(" ," ) : [" armeabi-v7a" , " x86" , " x86_64" , " arm64-v8a" ]
139
+ }
140
+
141
+ // Useful for syncing dependency versions from RN upstream.
142
+ def rnProperties = new Properties ()
143
+ rnProperties. load(new FileInputStream (file(" ../../node_modules/react-native/ReactAndroid/gradle.properties" )))
144
+
133
145
android {
134
146
defaultConfig {
135
147
applicationId " com.zulipmobile"
136
148
minSdkVersion rootProject. ext. minSdkVersion
137
149
targetSdkVersion rootProject. ext. targetSdkVersion
138
- versionCode 196
139
- versionName " 27.196 "
150
+ versionCode 197
151
+ versionName " 27.197 "
140
152
}
141
153
signingConfigs {
142
154
// The RN v0.60 template app suggests configuring a debug
@@ -164,7 +176,7 @@ android {
164
176
reset()
165
177
enable true // Build a separate APK for each ABI.
166
178
universalApk false // If true, also generate a universal APK
167
- include " armeabi-v7a " , " x86 " , " arm64-v8a " , " x86_64 "
179
+ include ( * reactNativeArchitectures())
168
180
}
169
181
}
170
182
buildTypes {
@@ -194,23 +206,34 @@ repositories {
194
206
}
195
207
196
208
dependencies {
197
- implementation fileTree(dir : " libs" , include : [" *.jar" ])
198
209
implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version "
210
+
199
211
implementation " androidx.core:core-ktx:1.7.0"
200
212
implementation ' androidx.appcompat:appcompat:1.0.0'
201
- implementation " androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
213
+ implementation ' androidx.browser:browser:1.0.0'
214
+
202
215
implementation " com.google.firebase:firebase-messaging:17.3.4"
216
+
217
+ // ==== Test dependencies
218
+ testImplementation ' junit:junit:4.12'
219
+ testImplementation ' org.junit.jupiter:junit-jupiter:5.4.0'
220
+ testImplementation ' com.google.truth:truth:0.43'
221
+ testImplementation ' com.google.truth.extensions:truth-java8-extension:0.43'
222
+ testImplementation ' org.mockito:mockito-core:1.10.19'
223
+
224
+ // ==== RN-related dependencies
225
+
226
+ // For animated GIF support:
227
+ implementation " com.facebook.fresco:animated-gif:${ rnProperties.get('FRESCO_VERSION')} "
228
+
229
+ // ----------------------------------------
230
+ // Dependencies from RN upstream, in the template app
231
+
232
+ implementation fileTree(dir : " libs" , include : [" *.jar" ])
203
233
// noinspection GradleDynamicVersion
204
234
implementation " com.facebook.react:react-native:+" // From node_modules
205
235
206
- // Workaround for facebook/react-native#32735; see
207
- // https://github.com/facebook/react-native/issues/32735#issue-1077061487
208
- // TODO(react-native-68): Remove; fixed in facebook/react-native@f45889ef9
209
- implementation(' com.facebook.soloader:soloader:0.10.3' ) {
210
- version {
211
- strictly ' 0.10.3'
212
- }
213
- }
236
+ implementation " androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
214
237
215
238
debugImplementation(" com.facebook.flipper:flipper:${ FLIPPER_VERSION} " ) {
216
239
exclude group : ' com.facebook.fbjni'
@@ -232,15 +255,10 @@ dependencies {
232
255
} else {
233
256
implementation jscFlavor
234
257
}
258
+ // END dependencies from RN upstream
259
+ // ----------------------------------------
235
260
236
- implementation ' com.facebook.fresco:animated-gif:2.0.0' // For animated GIF support
237
- implementation ' androidx.browser:browser:1.0.0'
238
-
239
- testImplementation ' junit:junit:4.12'
240
- testImplementation ' org.junit.jupiter:junit-jupiter:5.4.0'
241
- testImplementation ' com.google.truth:truth:0.43'
242
- testImplementation ' com.google.truth.extensions:truth-java8-extension:0.43'
243
- testImplementation ' org.mockito:mockito-core:1.10.19'
261
+ // Don't put new dependencies down here. Put them above, before the upstream section.
244
262
}
245
263
246
264
// The default kotlinOptions.jvmTarget is 1.6. With the default, we get
0 commit comments