Skip to content

Commit b301e9d

Browse files
committed
android: Fix animated GIFs in lightbox, by getting Fresco version automatically
This follows upstream's instructions: Note: the version listed above may not be updated in time. Please check `ReactAndroid/gradle.properties` in the main repo to see which fresco version is being used in a specific tagged version. https://reactnative.dev/docs/0.67/image#gif-and-webp-support-on-android except in an automated way. Happily this is even reasonably clean. Fixes: #5607
1 parent 0f5d771 commit b301e9d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

android/app/build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ def reactNativeArchitectures() {
138138
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
139139
}
140140

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+
141145
android {
142146
defaultConfig {
143147
applicationId "com.zulipmobile"
@@ -219,7 +223,8 @@ dependencies {
219223

220224
// ==== RN-related dependencies
221225

222-
implementation 'com.facebook.fresco:animated-gif:2.0.0' // For animated GIF support
226+
// For animated GIF support:
227+
implementation "com.facebook.fresco:animated-gif:${rnProperties.get('FRESCO_VERSION')}"
223228

224229
// Workaround for facebook/react-native#32735; see
225230
// https://github.com/facebook/react-native/issues/32735#issue-1077061487

0 commit comments

Comments
 (0)