@@ -130,13 +130,25 @@ def jscFlavor = 'org.webkit:android-jsc-intl:+'
130130 */  
131131def  enableHermes =  project. ext. react. get(" enableHermes" false );
132132
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+ 
133145android  {
134146    defaultConfig {
135147        applicationId " com.zulipmobile" 
136148        minSdkVersion rootProject. ext. minSdkVersion
137149        targetSdkVersion rootProject. ext. targetSdkVersion
138-         versionCode 196 
139-         versionName " 27.196 " 
150+         versionCode 197 
151+         versionName " 27.197 " 
140152    }
141153    signingConfigs {
142154        //  The RN v0.60 template app suggests configuring a debug
@@ -164,7 +176,7 @@ android {
164176            reset()
165177            enable true  //  Build a separate APK for each ABI.
166178            universalApk false   //  If true, also generate a universal APK
167-             include " armeabi-v7a " ,  " x86 " ,  " arm64-v8a " ,  " x86_64 " 
179+             include ( * reactNativeArchitectures()) 
168180        }
169181    }
170182    buildTypes {
@@ -194,23 +206,34 @@ repositories {
194206}
195207
196208dependencies  {
197-     implementation fileTree(dir : " libs" include : [" *.jar" 
198209    implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version  " 
210+ 
199211    implementation " androidx.core:core-ktx:1.7.0" 
200212    implementation ' androidx.appcompat:appcompat:1.0.0' 
201-     implementation " androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" 
213+     implementation ' androidx.browser:browser:1.0.0' 
214+ 
202215    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" 
203233    // noinspection GradleDynamicVersion
204234    implementation " com.facebook.react:react-native:+" //  From node_modules
205235
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" 
214237
215238    debugImplementation(" com.facebook.flipper:flipper:${ FLIPPER_VERSION} " 
216239        exclude group : ' com.facebook.fbjni' 
@@ -232,15 +255,10 @@ dependencies {
232255    } else  {
233256        implementation jscFlavor
234257    }
258+     //  END dependencies from RN upstream
259+     //  ----------------------------------------
235260
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.
244262}
245263
246264//  The default kotlinOptions.jvmTarget is 1.6.  With the default, we get
0 commit comments