1-dontobfuscate
2
3-keep class eu.siacs.conversations.**
4
5-keep class org.whispersystems.**
6
7-keep class com.kyleduo.switchbutton.Configuration
8
9-keep class com.soundcloud.android.crop.**
10
11-keep class com.google.android.gms.**
12
13-keep class org.openintents.openpgp.*
14-keep class org.webrtc.** { *; }
15
16-dontwarn javax.mail.internet.MimeMessage
17-dontwarn javax.mail.internet.MimeBodyPart
18-dontwarn javax.mail.internet.SharedInputStream
19-dontwarn javax.activation.DataContentHandler
20-dontwarn org.bouncycastle.mail.**
21-dontwarn org.bouncycastle.x509.util.LDAPStoreHelper
22-dontwarn org.bouncycastle.jce.provider.X509LDAPCertStoreSpi
23-dontwarn org.bouncycastle.cert.dane.**
24-dontwarn rocks.xmpp.addr.**
25-dontwarn com.google.firebase.analytics.connector.AnalyticsConnector
26-dontwarn java.lang.**
27-dontwarn javax.lang.**
28
29-dontwarn com.android.org.conscrypt.SSLParametersImpl
30-dontwarn org.apache.harmony.xnet.provider.jsse.SSLParametersImpl
31-dontwarn org.bouncycastle.jsse.BCSSLParameters
32-dontwarn org.bouncycastle.jsse.BCSSLSocket
33-dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider
34-dontwarn org.openjsse.javax.net.ssl.SSLParameters
35-dontwarn org.openjsse.javax.net.ssl.SSLSocket
36-dontwarn org.openjsse.net.ssl.OpenJSSE
37
38-keepclassmembers class eu.siacs.conversations.http.services.** {
39 !transient <fields>;
40}
41
42# Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and
43# EnclosingMethod is required to use InnerClasses.
44-keepattributes Signature, InnerClasses, EnclosingMethod
45
46# Retrofit does reflection on method and parameter annotations.
47-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
48
49# Retain service method parameters when optimizing.
50-keepclassmembers,allowshrinking,allowobfuscation interface * {
51 @retrofit2.http.* <methods>;
52}
53
54# Ignore annotation used for build tooling.
55-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
56
57# Ignore JSR 305 annotations for embedding nullability information.
58-dontwarn javax.annotation.**
59
60# Guarded by a NoClassDefFoundError try/catch and only used when on the classpath.
61-dontwarn kotlin.Unit
62
63# Top-level functions that can only be used by Kotlin.
64-dontwarn retrofit2.KotlinExtensions
65-dontwarn retrofit2.KotlinExtensions$*
66
67
68# With R8 full mode, it sees no subtypes of Retrofit interfaces since they are created with a Proxy
69# and replaces all potential values with null. Explicitly keeping the interfaces prevents this.
70-if interface * { @retrofit2.http.* <methods>; }
71-keep,allowobfuscation interface <1>
72
73# Keep inherited services.
74-if interface * { @retrofit2.http.* <methods>; }
75-keep,allowobfuscation interface * extends <1>
76
77# With R8 full mode generic signatures are stripped for classes that are not
78# kept. Suspend functions are wrapped in continuations where the type argument
79# is used.
80-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
81
82# R8 full mode strips generic signatures from return types if not kept.
83-if interface * { @retrofit2.http.* public *** *(...); }
84-keep,allowoptimization,allowshrinking,allowobfuscation class <3>
85
86-keepattributes *Annotation*,SourceFile,LineNumberTable