Open Alireza-Farahani opened 3 years ago
You can use it without OkHttp. Okio is required.
Is my approach for excluding Okhttp OK or do you recommend anything else?
@JakeWharton What do you think about separating classes that use OkHttp into their own module? (Something like picasso-okhttp
). Would that be possible?
We can certainly consider making it easier to exclude OkHttp long-term (assuming Picasso will ever see another release), but it would likely always be an opt-out thing rather than requiring the overwhelming majority of users to opt-in to OkHttp.
I'm working on an app with limitation of being offline (No internet permission in manifest) and small Apk size (2mb). I think Picasso should not be bound to online/remote images and it would be great if I can use Picasso for its caching and transformation pipeline and other features.
I tried to exclude Okhttp and Okio dependency from Picasso in Gradle, create a dummy
Downloader
and added Okio and Okhttp as compileOnly dependencies (Downloader is never used when using device resources), but it crashes in runtime on this lines fromUtils.java
class because ByteString belongs to OkioIs it possible at all to use Picasso without Okio and Okhttp?
I know that you keep Github issues for bugs and feature request, but I thought this questions is too relevant to Picasso internals to be asked in Stackoverflow.