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-dontwarn org.jetbrains.annotations.**
38
39-keepclassmembers class eu.siacs.conversations.http.services.** {
40  !transient <fields>;
41}
42
43# Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and
44# EnclosingMethod is required to use InnerClasses.
45-keepattributes Signature, InnerClasses, EnclosingMethod
46
47# Retrofit does reflection on method and parameter annotations.
48-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
49
50# Retain service method parameters when optimizing.
51-keepclassmembers,allowshrinking,allowobfuscation interface * {
52    @retrofit2.http.* <methods>;
53}
54
55# Ignore annotation used for build tooling.
56-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
57
58# Ignore JSR 305 annotations for embedding nullability information.
59-dontwarn javax.annotation.**
60
61# Guarded by a NoClassDefFoundError try/catch and only used when on the classpath.
62-dontwarn kotlin.Unit
63
64# Top-level functions that can only be used by Kotlin.
65-dontwarn retrofit2.KotlinExtensions
66-dontwarn retrofit2.KotlinExtensions$*
67
68
69# With R8 full mode, it sees no subtypes of Retrofit interfaces since they are created with a Proxy
70# and replaces all potential values with null. Explicitly keeping the interfaces prevents this.
71-if interface * { @retrofit2.http.* <methods>; }
72-keep,allowobfuscation interface <1>
73
74# Keep inherited services.
75-if interface * { @retrofit2.http.* <methods>; }
76-keep,allowobfuscation interface * extends <1>
77
78# With R8 full mode generic signatures are stripped for classes that are not
79# kept. Suspend functions are wrapped in continuations where the type argument
80# is used.
81-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
82
83# R8 full mode strips generic signatures from return types if not kept.
84-if interface * { @retrofit2.http.* public *** *(...); }
85-keep,allowoptimization,allowshrinking,allowobfuscation class <3>
86
87-keepattributes *Annotation*,SourceFile,LineNumberTable