Realm ProGuard rules

Realm – developer-friendly platform makes it easy to build reactive apps, realtime collaborative features, and offline-first experiences.

Realm Mobile Database is an alternative to SQLite and Core Data.

ProGuard rules for Realm

By default, shrinking is applied; all classes and methods are removed. In the obfuscation step, ProGuard renames classes and class members that are not entry points.

A ProGuard configuration is provided as part of the Realm library. You don’t need to add any specific rules to your ProGuard configuration.

# Realm
-dontnote io.realm.internal.SyncObjectServerFacade

-keep class io.realm.annotations.RealmModule
-keep @io.realm.annotations.RealmModule class *

-keep class io.realm.internal.Keep
-keep @io.realm.internal.Keep class * { *; }

-keep class io.realm.internal.KeepMember
-keep @io.realm.internal.KeepMember class * { @io.realm.internal.KeepMember *; }

-dontwarn javax.**
-dontwarn io.realm.**
-keep class io.realm.RealmCollection
-keep class io.realm.OrderedRealmCollection
-keepclasseswithmembernames class io.realm.** {
    native ;

-dontnote rx.Observable

-dontwarn okio.Okio
-dontwarn okio.DeflaterSink

-dontnote org.apache.harmony.xnet.provider.jsse.SSLParametersImpl

For more information about please see Realm website.

Related ProGuard rules

Static Gson ProGuard rules

Popular ProGuard rules