-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(MM-62375): OOM on gif #8573
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,10 @@ include ':reactnativenotifications' | |
project(':reactnativenotifications').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-notifications/lib/android/app') | ||
include ':watermelondb-jsi' | ||
project(':watermelondb-jsi').projectDir = new File(rootProject.projectDir, '../node_modules/@nozbe/watermelondb/native/android-jsi') | ||
include ':frameanimation' | ||
project(':frameanimation').projectDir = new File('../node_modules/APNG4Android/frameanimation') | ||
include ':gif' | ||
project(':gif').projectDir = new File('../node_modules/APNG4Android/gif') | ||
Comment on lines
+11
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In order to get this as project in expo-image/android/build.gradle, need to declare |
||
includeBuild('../node_modules/@react-native/gradle-plugin') | ||
apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle") | ||
useExpoModules() |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,7 @@ | |
"expo-application": "6.0.1", | ||
"expo-crypto": "14.0.1", | ||
"expo-device": "7.0.1", | ||
"expo-image": "2.0.3", | ||
"expo-image": "2.0.4", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any reason to bump this? Just curious There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I made a mistake when reading the changelog. And looking at the changes, I thought the addition of try..catch was going to help, but it didn't. Looking deeper, I noticed that it was already implemented in 2.0.3, not a new change in 2.0.4. Changelog for 2.0.4:
So it's pretty moot. |
||
"expo-linear-gradient": "14.0.1", | ||
"expo-store-review": "8.0.0", | ||
"expo-video-thumbnails": "9.0.2", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,21 @@ | ||
diff --git a/node_modules/expo-image/android/build.gradle b/node_modules/expo-image/android/build.gradle | ||
index a85fb5e..ac568c1 100644 | ||
--- a/node_modules/expo-image/android/build.gradle | ||
+++ b/node_modules/expo-image/android/build.gradle | ||
@@ -44,7 +44,12 @@ dependencies { | ||
kapt "com.github.bumptech.glide:compiler:${GLIDE_VERSION}" | ||
api 'com.caverock:androidsvg-aar:1.4' | ||
|
||
- implementation "com.github.penfeizhou.android.animation:glide-plugin:3.0.2" | ||
+ implementation project(':frameanimation') | ||
+ implementation project(':gif') | ||
+ implementation("com.github.penfeizhou.android.animation:glide-plugin:3.0.2") { | ||
+ exclude group: 'com.github.penfeizhou.android.animation', module: 'frameanimation' | ||
+ exclude group: 'com.github.penfeizhou.android.animation', module: 'gif' | ||
Comment on lines
+13
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Without exclusions, it will cause duplicate symbols error. Since glide-plugin will have frameanimation (required module) in other modules (apng, webp, etc). |
||
+ } | ||
Comment on lines
+10
to
+15
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The fixes are in frameanimation & gif. Now in this PR (that will not get merged). |
||
implementation "com.github.bumptech.glide:avif-integration:${GLIDE_VERSION}" | ||
|
||
api 'com.github.bumptech.glide:okhttp3-integration:4.11.0' | ||
diff --git a/node_modules/expo-image/android/src/main/java/expo/modules/image/okhttp/ExpoImageOkHttpClientGlideModule.kt b/node_modules/expo-image/android/src/main/java/expo/modules/image/okhttp/ExpoImageOkHttpClientGlideModule.kt | ||
index 071907c..edf10c1 100644 | ||
--- a/node_modules/expo-image/android/src/main/java/expo/modules/image/okhttp/ExpoImageOkHttpClientGlideModule.kt | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,3 +45,8 @@ else | |
mkdir -p "android/app/src/main/res/raw/" | ||
cp $SOUNDS/* "android/app/src/main/res/raw/" | ||
fi | ||
|
||
APNG4Android="node_modules/APNG4Android" | ||
if [ ! -z "$APNG4Android" ]; then | ||
git clone -b "fix/MM-62375-oom-on-gif" --single-branch https://github.com/rahimrahman/APNG4Android.git "$APNG4Android"; | ||
fi | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can't do
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No you cannot clone a specific commit, but you can clone the branch and then do a checkout There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You could also use --depth=1 so that it only clones the latest one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any benefit of putting it into node_modules instead of a custom folder on the root path of the app?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Irrelevant in my opinion, but of it works here no need to change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like node_modules because it's easier to do the
npm run clean
and it'll auto-clean this library as well. But I could also have added an extra line to clean the folder wherever it might be in scripts/clean.sh as well.I'll stick with node_modules.