Closed ubuntudroid closed 3 years ago
Thanks for raising @ubuntudroid This seems like a valid concern given. We've made the effort to move away our direct dependencies on support over to jetpack libraries and this makes that effort futile.
I bet there are image processing libraries that don't have similar problems. The scope of the fix is really limited to migrating the dependency on Picasso out to some other library. The migration is tightly scoped to this one file if you are inclined to send a fix our way 🥇
@ashwinraghav From what I see there are two options:
Thanks for pointing that out. I'll leave this open until we have a version of Picasso we can migrate to. It's probably not worth the effort to move libraries given that Picasso is expected to be on Jetpack at some point .
I think we should also consider FR #1025 which might solve this problem.
Update: Oops, I only noticed now that it has been closed in favor of improving the current image loader. My bad
@ashwinraghav Can we consider a different solution to "wait for Picasso 3.0". There is no ETA on this and it has been in-progress for quite a while. Also, it seems wasteful for any app that is using a different Image Loader such as Coil to include Picasso. I think Firebase In-app Messaging may be the only dependency requiring the use of Jettifier for many projects.
Is it possible to use Firebase In-app Messaging without it forcing the use of Picasso, such as by implementing the "display" component yourself? Or would it be possible to implement downloading an image to display in the in-app message within the library?
@lordcodes Thanks for the follow up. To your point, here's something we can do:
Have the Image Loader implement an interface and externalize this implementation as a separate library (say) com.google.firebase:fiam-image-loader. Fiam will ship with a dependency on this externalized library by default, since it would be a (severe) breaking change otherwise.
Customers who want to use an alternate image library can exclude this library
implementation ("com.google.firebase:firebase-inappmessaging:....") {
exclude "com.google.firebase:fiam-image-loader"
}
And provide their own implementation of the aforementioned interface, and add a manifest entry for Firebase to discover the implementation..
This becomes the case since providing a default implementation that requires no programmatic interaction is imperative to avoid this be a breaking change for most developers.
@ashwinraghav What you have described is almost exactly what I would like to see.
Would be very eager to see this!
If you are inclined to contribute, pls send us a PR and I'm happy to review your change.
It turns out there isn't a need to wait for Picasso 3.0. Picasso 2.8 was recently released, and it migrated over to androidx: https://github.com/square/picasso/pull/2176.
Any update on Migration to 2.8?
Rather than waiting you can use Gradle to force Picasso 2.8 to be used.
In Gradle Kotlin DSL:
implementation("com.squareup.picasso:picasso") {
version {
strictly("2.8")
}
because("Firebase In-App Messaging Display includes a Picasso version that doesn't use AndroidX")
}
Moved from Picasso to Glide - merged as #2068 on branch master with no release tags yet, I suppose we're just waiting on release?
c.f. https://github.com/firebase/firebase-android-sdk/commit/bc850aa4cb8298b30598bd30da661b591e784d4b
Apologies just saw BoM 28.4.0 was released with this in it! :trophy: https://firebase.google.com/support/release-notes/android#inappmessaging_v20-1-0
Apologies just saw BoM 28.4.0 was released with this in it! 🏆 https://firebase.google.com/support/release-notes/android#inappmessaging_v20-1-0
Closing this thread since the glide migration is released. Feel free to reopen in case of any issues.
What feature would you like to see?
Right now you need to enable jetifier if you pull in the firebase-inappmessaging-display dependency as reported in #535 . This is due to a dependency on picasso which pulls in com.android.support:exifinterface:
However, enabling jetifier, while undoubtedly handy in cases like these, unnecessarily slows down builds.
How would you use it?
I'd disable jetifier and enjoy faster builds. 🚀