I'm doing a small Android Application, currently the apk has 382KB, and I'm using OkHttp, looking inside the apk, the Okhttp inserts a file publicsuffixes.gz that has 33Kb (8~9% of total apk size).
If I exclude the file with the follow code the application crashes, so it obviously necessary, my question is, what is the function of that file and is it possible to replace or modify to reduce the size?
The exclude code:
android {
...
packagingOptions {
exclude "publicsuffixes.gz"
}
}
Firstly, this shouldn't fail if you don't configure your client to support cookies. Can you provide a stacktrace of it failing?
If you need cookies but don't care about security (YOLO!) I suspect you could hack something up by modifying https://github.com/square/okhttp/blob/9bfe575960af8e7bb164642f2f513b5ccb39ff4f/okhttp/src/test/java/okhttp3/internal/publicsuffix/PublicSuffixListGenerator.java
To have a basically empty file. It seems like a bad idea, but caveat emptor. You will break security around Cookie handling, which may or may not be acceptable to you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With