-
-
Notifications
You must be signed in to change notification settings - Fork 735
Compiling with ProGuard #533
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
Comments
Hm, im not sure but you can try adding this to your proguard-rules.pro: -keep class okhttp3.** { *; } or try this -keep class okhttp3.** Not an expert in proguard, but similar problems were fixed like this. As i understand these lines keeps proguard from obfuscating the specified classes. I also have this in my proguard: -keep class com.parse.* { ; } |
Thanks, this was the only line I needed to add:
I'm not sure why that would be. Parse shouldn't be throwing warnings in the first place, because all of those okhttp3 classes should be kept in, not sure why the keep statements don't work. It would be nice to not have to write custom proguard rules just to build a basic Parse app, but thanks for the workaround. |
|
Yeah you'd think that would work, but what I'm saying is that ProGuard is defying all logic here... Only And neither of these should be necessary in the first place, since Parse has a ProGuard file configured to keep those classes. 😕 |
@danepowell try with I have not read parse ProGuard file, but this is not about keeping. ProGuard can’t keep okhttp3 classes because you are not using okhttp3. Internally, parse network interface can rely on different http libraries (Apache Http, OkHttp). Which library is used, it depends on which library is available. If you |
There was somewhere here exact same issue, i remember answering it and it was fixed. |
Thanks, Your explanation makes sense. I'm almost certain that it's inconsequential, but I'm curious if there's a preferred HTTP library. |
OkHttpClient is the preferred. Does the proguard rules just need to add |
@rogerhu This shouldn't be an issue in the next version since the SDK will have a hard dependency on Okhttp |
thanks |
Thanks, can't wait to try it. It seems like Maven doesn't have the latest releases (1.13.2 or 1.13.3), does it need to be updated? |
Waiting for Parse guys to help figure out how to release Maven staged deploys. It's up on Sonatype snapshots (even v1.14.1-SNAPSHOT which includes this OkHttp changes.) In the interim, can you try out v1.14.1-SNAPSHOT? |
V1.13.3 should be out...Can you check out? |
Seems to be working, thanks! |
I'm having no luck trying to compile a project depending on Parse with ProGuard.
When I set minifyEnabled to true in the project, I get dozens of warnings related to OkHttp:
My understanding is that these warnings should have been fixed in #414, as long as I'm using the AAR dependency, which I'm pretty sure I am (in app/build.gradle):
Oddly, even if I copy Parse's proguard rules to my own app, the warnings still show up.
I'm at a loss for how to continue debugging this. Can anyone help?
The text was updated successfully, but these errors were encountered: