Skip to content
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

Audit consumer proguard rules #878

Closed
samtstern opened this issue Aug 23, 2017 · 2 comments
Closed

Audit consumer proguard rules #878

samtstern opened this issue Aug 23, 2017 · 2 comments

Comments

@samtstern
Copy link
Contributor

cc @ashwinraghav who has been helping a developer debug a proguard issue

In #573 the following lines were introduced to the consumer proguard rules:

// REMOVED
-dontwarn retrofit.**		
-dontwarn retrofit2.**		

// ADDED
-dontnote retrofit2.Platform
-dontnote retrofit2.Platform$IOS$MainThreadExecutor
-dontwarn retrofit2.Platform$Java8

Ashwin changed them to this in a branch that seems to solve the developer's issue:

-dontwarn okio.** #safe
-dontwarn retrofit2.Call #safe
#-dontnote retrofit2.Platform #unsafe
#-dontnote retrofit2.Platform$IOS$MainThreadExecutor
-dontwarn retrofit2.Platform$Java8 #safe

Ashwin can you explain what the issue was?

@SUPERCILEX
Copy link
Collaborator

As a side note, this is Retrofit v2.3.0's suggested config:

# Platform calls Class.forName on types which do not exist on Android to determine platform.
-dontnote retrofit2.Platform
# Platform used when running on Java 8 VMs. Will not be used at runtime.
-dontwarn retrofit2.Platform$Java8
# Retain generic type information for use by reflection by converters and adapters.
-keepattributes Signature
# Retain declared checked exceptions for use by a Proxy instance.
-keepattributes Exceptions

@samtstern
Copy link
Contributor Author

This has been fixed and released in version 3.2.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants