Vault ProGuard rules

Vault – Android library that simplifies persistence of data from Contentful via SQLite.

It lets you define Java representations for your Contentful models. Then, at compile-time it will create a corresponding database schema by generating all the required boilerplate code and injecting it to the classpath.

ProGuard rules for Vault

ProGuard removes calls to unused classes and methods. ProGuard obfuscates the remaining classes, fields, and methods with short names. Specify the next rules in proguard-rules.pro configuration file.

# Vault
-keepattributes Signature
-dontwarn javax.lang.model.type.TypeMirror
-keep class com.contentful.vault.** { *; }
-keep class **$$SpaceHelper { *; }
-keep class **$$ModelHelper { *; }
-keep class **$Fields extends com.contentful.vault.BaseFields { *; }
-keep @com.contentful.vault.ContentType class * { *; }
-keep @com.contentful.vault.Space class * { *; }

# contentful.java
-keep class com.contentful.java.cda.** { *; }

# RxJava
-dontwarn rx.**

# OkHttp
-keepattributes *Annotation*
-keep class com.squareup.okhttp.** { *; }
-keep interface com.squareup.okhttp.** { *; }
-dontwarn com.squareup.okhttp.**

# Retrofit
-dontwarn retrofit.**
-keep class retrofit.** { *; }
-keepclasseswithmembers class * {
    @retrofit.http.* ;
}

# Okio
-keep class sun.misc.Unsafe { *; }
-dontwarn java.nio.file.*
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
-dontwarn okio.**

# Gson
-keepattributes EnclosingMethod
-keep class com.google.gson.stream.** { *; }

For more information about Vault please see the website.

Static Gson ProGuard rules

Popular ProGuard rules