Retrofit ProGuard rules

Retrofit - type-safe HTTP client for Android and Java by Square, Inc.

ProGuard rules for Retrofit

ProGuard removes unused classes, methods, and it optimizes the rest your code. After ProGuard shrinks your code, reading a code is difficult because the method names are obfuscated. Specify the following ProGuard rules in configuration file.

# 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

For more information about Retrofit please see the website.

Related ProGuard rules

Static Gson ProGuard rules

Popular ProGuard rules