2018-10-03 23:56:33 +08:00
|
|
|
# Add project specific ProGuard rules here.
|
|
|
|
# You can control the set of applied configuration files using the
|
|
|
|
# proguardFiles setting in build.gradle.
|
|
|
|
#
|
|
|
|
# For more details, see
|
|
|
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
|
|
|
|
|
|
# If your project uses WebView with JS, uncomment the following
|
|
|
|
# and specify the fully qualified class name to the JavaScript interface
|
|
|
|
# class:
|
|
|
|
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
|
|
|
# public *;
|
|
|
|
#}
|
|
|
|
|
|
|
|
# Uncomment this to preserve the line number information for
|
|
|
|
# debugging stack traces.
|
|
|
|
#-keepattributes SourceFile,LineNumberTable
|
|
|
|
|
|
|
|
# If you keep the line number information, uncomment this to
|
|
|
|
# hide the original source file name.
|
|
|
|
#-renamesourcefileattribute SourceFile
|
2020-06-12 01:36:15 +08:00
|
|
|
|
|
|
|
|
|
|
|
### EVENT BUS ###
|
|
|
|
|
|
|
|
-keepattributes *Annotation*
|
|
|
|
-keepclassmembers class * {
|
|
|
|
@org.greenrobot.eventbus.Subscribe <methods>;
|
|
|
|
}
|
|
|
|
-keep enum org.greenrobot.eventbus.ThreadMode { *; }
|
|
|
|
|
|
|
|
### MOSHI ###
|
|
|
|
|
|
|
|
# JSR 305 annotations are for embedding nullability information.
|
|
|
|
|
|
|
|
-dontwarn javax.annotation.**
|
|
|
|
|
|
|
|
-keepclasseswithmembers class * {
|
|
|
|
@com.squareup.moshi.* <methods>;
|
|
|
|
}
|
|
|
|
|
|
|
|
-keep @com.squareup.moshi.JsonQualifier interface *
|
|
|
|
|
|
|
|
# Enum field names are used by the integrated EnumJsonAdapter.
|
|
|
|
# values() is synthesized by the Kotlin compiler and is used by EnumJsonAdapter indirectly
|
|
|
|
# Annotate enums with @JsonClass(generateAdapter = false) to use them with Moshi.
|
|
|
|
-keepclassmembers @com.squareup.moshi.JsonClass class * extends java.lang.Enum {
|
|
|
|
<fields>;
|
|
|
|
**[] values();
|
|
|
|
}
|
|
|
|
|
|
|
|
-keep class kotlin.reflect.jvm.internal.impl.builtins.BuiltInsLoaderImpl
|
|
|
|
|
|
|
|
-keepclassmembers class kotlin.Metadata {
|
|
|
|
public <methods>;
|
|
|
|
}
|
|
|
|
|
|
|
|
### OKHTTP for Android Studio ###
|
|
|
|
-keep class okhttp3.Headers { *; }
|
|
|
|
-keep interface okhttp3.Interceptor.* { *; }
|
|
|
|
|
|
|
|
### OLM JNI ###
|
2020-06-29 05:04:30 +08:00
|
|
|
-keep class org.matrix.olm.** { *; }
|
|
|
|
|
|
|
|
### Webrtc
|
|
|
|
-keep class org.webrtc.** { *; }
|
2020-07-03 01:26:05 +08:00
|
|
|
|
|
|
|
### Serializable persisted classes
|
|
|
|
# https://www.guardsquare.com/en/products/proguard/manual/examples#serializable
|
|
|
|
-keepnames class * implements java.io.Serializable
|
|
|
|
|
|
|
|
-keepclassmembers class * implements java.io.Serializable {
|
|
|
|
static final long serialVersionUID;
|
|
|
|
private static final java.io.ObjectStreamField[] serialPersistentFields;
|
|
|
|
!static !transient <fields>;
|
|
|
|
!private <fields>;
|
|
|
|
!private <methods>;
|
|
|
|
private void writeObject(java.io.ObjectOutputStream);
|
|
|
|
private void readObject(java.io.ObjectInputStream);
|
|
|
|
java.lang.Object writeReplace();
|
|
|
|
java.lang.Object readResolve();
|
|
|
|
}
|