-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
proguard-rules.pro
219 lines (181 loc) · 7.48 KB
/
proguard-rules.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# This is a configuration file for R8
-dontobfuscate
# Keep extension's common dependencies
-keep class ireader.core.source.** { public protected *; }
-keep class ireader.core.http.** { public protected *; }
-keep class ireader.data.catalog.CatalogGithubApi { public protected *; }
-keep,allowoptimization class ireader.** { public protected *; }
-keep,allowoptimization class kotlinx.coroutines.** { public protected *; }
-keep,allowoptimization class androidx.preference.** { public protected *; }
-keep,allowoptimization class okhttp3.** { public protected *; }
-keep,allowoptimization class okio.** { public protected *; }
-keep,allowoptimization class org.jsoup.** { public protected *; }
-keep,allowoptimization class kotlin.** { public protected *; }
-keep,allowoptimization class io.ktor.** { public protected *; }
-keep,allowoptimization class android.content.pm.** { public protected *; }
-keep,allowoptimization class com.google.gson.** { public protected *; }
-keep,allowoptimization class androidx.lifecycle.** { public protected *; }
-keep,allowoptimization class androidx.work.** { public protected *; }
-keep,allowoptimization class androidx.hilt.** { public protected *; }
-keep,allowoptimization class androidx.datastore.** { public protected *; }
-keep,allowoptimization class org.jetbrains.kotlinx.** { public protected *; }
-keep,allowoptimization class app.cash.quickjs.** { public protected *; }
-keep,allowoptimization class com.google.accompanist.** { public protected *; }
-keep,allowoptimization class androidx.compose.** { public protected *; }
-keep,allowoptimization class org.tinylog.** { public protected *; }
-keep,allowoptimization class nl.siegmann.epublib.** { public protected *; }
-keep,allowoptimization class org.slf4j.** { public protected *; }
-keep class org.xmlpull.** { public protected *; }
-keep,allowoptimization class org.koin.** { public protected *; }
-keep,allowoptimization class app.cash.sqldelight.** { public protected *; }
-keep,allowoptimization class okhttp3.** { public protected *; }
-dontwarn okhttp3.internal.Util
-dontwarn android.support.**
-dontwarn androidx.**
-keepattributes SourceFile,
LineNumberTable,
RuntimeVisibleAnnotations,
RuntimeVisibleParameterAnnotations,
RuntimeVisibleTypeAnnotations,
AnnotationDefault
-renamesourcefileattribute SourceFile
-dontwarn org.conscrypt.**
##---------------Begin: proguard configuration for couroutines ----------
# When editing this file, update the following files as well:
# - META-INF/com.android.tools/proguard/coroutines.pro
# - META-INF/com.android.tools/r8/coroutines.pro
# ServiceLoader support
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
# Most of volatile fields are updated with AFU and should not be mangled
-keepclassmembers class kotlinx.coroutines.** {
volatile <fields>;
}
# Same story for the standard library's SafeContinuation that also uses AtomicReferenceFieldUpdater
-keepclassmembers class kotlin.coroutines.SafeContinuation {
volatile <fields>;
}
##---------------End: proguard configuration for Couroutines ----------
##---------------Begin: proguard configuration for Okhttp ----------
#Okhttp
# JSR 305 annotations are for embedding nullability information.
-dontwarn javax.annotation.**
# A resource is loaded with a relative path so the package of this class must be preserved.
-adaptresourcefilenames okhttp3/internal/publicsuffix/PublicSuffixDatabase.gz
# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
-dontwarn org.codehaus.mojo.animal_sniffer.*
# OkHttp platform used only on JVM and when Conscrypt and other security providers are available.
-dontwarn okhttp3.internal.platform.**
-dontwarn org.conscrypt.**
-dontwarn org.bouncycastle.**
-dontwarn org.openjsse.**
##---------------End: proguard configuration for Okhttp ----------
##---------------Begin: proguard configuration for okio ----------
# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
-dontwarn org.codehaus.mojo.animal_sniffer.*
##---------------End: proguard configuration for okio ----------
##---------------Begin: proguard configuration for Ktor ----------
# Ktor
-keep class io.ktor.** { *; }
-keep class kotlinx.coroutines.** { *; }
-keep class com.typesafe.** { *; }
-dontwarn kotlinx.atomicfu.**
-dontwarn io.netty.**
-dontwarn com.typesafe.**
-dontwarn org.slf4j.**
##---------------End: proguard configuration for Ktor ----------
#---------
# Keep trakt-java and tmdb-java entity names (for GSON)
-keep class ireader.common.models.*.entities.** {
<fields>;
<init>(...);
}
-keep class ireader.common.models.*.entities.** {
<fields>;
<init>(...);
}
-keep class org.ireader.data.catalog.** {
kotlinx.serialization.KSerializer serializer(...);
<fields>;
<init>(...);
}
-keep class ireader.common.models.** {
kotlinx.serialization.KSerializer serializer(...);
<fields>;
<init>(...);
}
##---------------Begin: proguard configuration for Gson ----------
# Gson uses generic type information stored in a class file when working with fields. Proguard
# removes such information by default, so configure it to keep all of it.
-keepattributes Signature
# For using GSON @Expose annotation
-keepattributes *Annotation*
-dontnote kotlinx.serialization.* # core serialization annotations
# Gson specific classes
-dontwarn sun.misc.**
##---------------End: proguard configuration for Gson ----------
##---------------Begin: proguard configuration for kotlinx.serialization ----------
-keepattributes *Annotation*, InnerClasses
# kotlinx-serialization-json specific.
-keepclassmembers class kotlinx.serialization.json.** {
*** Companion;
}
-keepclasseswithmembers class kotlinx.serialization.json.** {
kotlinx.serialization.KSerializer serializer(...);
}
-keep,includedescriptorclasses class ireader.**$$serializer { *; }
-keepclassmembers class org.ireader.** {
*** Companion;
}
-keepclasseswithmembers class ireader.** {
kotlinx.serialization.KSerializer serializer(...);
}
-keep class kotlinx.serialization.**
-keepclassmembers class kotlinx.serialization.** {
<methods>;
}
##---------------End: proguard configuration for kotlinx.serialization ----------
-keep class cafe.adriel.voyager.*
-keepclassmembers class cafe.adriel.voyager.** {
}
-keep class com.oracle.svm.core.annotate.*
-keepclassmembers class com.oracle.svm.core.annotate.** {
<methods>;
}
-keep class com.oracle.svm.core.configure.*
-keepclassmembers class com.oracle.svm.core.configure.** {
<methods>;
}
-keep class dalvik.system.*
-keepclassmembers class dalvik.system.** {
<methods>;
}
-keep class java.beans.*
-keepclassmembers class java.beans.** {
<methods>;
}
-keep class java.lang.*
-keepclassmembers class java.lang.** {
<methods>;
}
-keep class javax.naming.*
-keepclassmembers class javax.naming.** {
<methods>;
}
-keep class javax.xml.stream.*
-keepclassmembers class javax.xml.stream.** {
<methods>;
}
-keep class com.google.gson.reflect.TypeToken
-keep class * extends com.google.gson.reflect.TypeToken
-keep public class * implements java.lang.reflect.Type
-dontwarn com.oracle.svm.core.annotate.**
-dontwarn com.oracle.svm.core.configure.**
-dontwarn dalvik.system.**
-dontwarn java.beans.**
-dontwarn java.beans.**
-dontwarn java.lang.**
-dontwarn javax.naming.**
-dontwarn javax.xml.stream.**
-dontwarn org.graalvm.nativeimage.**
-dontwarn sun.reflect.**