-
Notifications
You must be signed in to change notification settings - Fork 0
/
pspdfkit-proguard.cfg
113 lines (93 loc) · 4.02 KB
/
pspdfkit-proguard.cfg
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
-dontwarn com.android.tools.lint.**
-dontwarn org.conscrypt.ConscryptHostnameVerifier
-dontwarn com.google.android.youtube.player.**
# Keep PSPDFKit internal classes – they are already proguarded by default.
-keep class com.pspdfkit.internal.** { *; }
-keep class com.pspdfkit.datastructures.Range { *; }
-keep class com.pspdfkit.exceptions.** { *; }
-keep class com.pspdfkit.undo.exceptions** { *; }
-keep class com.pspdfkit.utils.** { *; }
# Keep PSPDFKit Instant internal classes – they are already proguarded by default.
-keep class com.pspdfkit.instant.internal.** { *; }
-keep class com.pspdfkit.instant.exceptions.** { *; }
-keep class com.pspdfkit.instant.ui.** { *; }
-keepparameternames
-keepattributes Exceptions
-keepattributes InnerClasses
-keepattributes Signature
-keepattributes Deprecated
-keepattributes SourceFile
-keepattributes LineNumberTable
-keepattributes *Annotation*
-keepattributes EnclosingMethod
# Preserve all .class method names.
-keepclassmembernames class * {
java.lang.Class class$(java.lang.String);
java.lang.Class class$(java.lang.String, boolean);
}
# Preserve all native method names and the names of their classes.
-keepclasseswithmembernames,includedescriptorclasses class * {
native <methods>;
}
# Preserve the special static methods that are required in all enumeration classes.
-keepclassmembers,allowoptimization enum * {
public static **[] values(); public static ** valueOf(java.lang.String);
}
# Explicitly preserve all serialization members. The Serializable interface
# is only a marker interface, so it wouldn't save them.
-keepclassmembers class * implements java.io.Serializable {
static final long serialVersionUID;
private static final java.io.ObjectStreamField[] serialPersistentFields;
private void writeObject(java.io.ObjectOutputStream);
private void readObject(java.io.ObjectInputStream);
java.lang.Object writeReplace();
java.lang.Object readResolve();
}
# Explicitly preseve all parcelation members.
-keepclassmembers class * implements android.os.Parcelable {
public static final ** CREATOR;
}
# Preseve classes/methods/fields with keep annotation
-keep class androidx.annotation.Keep
-keep @androidx.annotation.Keep class * {*;}
-keepclasseswithmembers class * {
@androidx.annotation.Keep <methods>;
}
-keepclasseswithmembers class * {
@androidx.annotation.Keep <fields>;
}
-keepclasseswithmembers class * {
@androidx.annotation.Keep <init>(...);
}
# RxJava is used by PSPDFKit and needs these lines for proper operation.
-keep class rx.internal.util.unsafe.** { *; }
-keep class io.reactivex.Observable
# API 19 specific rules
-keep class io.reactivex.subjects.ReplaySubject { *; }
-keep class io.reactivex.processors.BehaviorProcessor { *; }
# Optional third party libraries. You can safely ignore those warnings.
-dontwarn com.pspdfkit.ui.PdfYouTubeActivity
-dontwarn com.pspdfkit.media.MediaGalleryView*
-dontwarn com.squareup.okhttp.**
-dontwarn com.getkeepsafe.relinker.**
-dontwarn com.facebook.device.yearclass.**
-dontwarn sun.misc.**
-dontwarn com.pspdfkit.internal.**
# OkHttp is used by PSPDFKit Instant and needs these lines for proper operation.
-keep class okhttp3.** { *; }
-dontwarn okio.**
-dontwarn okhttp3.**
-dontwarn javax.annotation.Nullable
-dontwarn javax.annotation.ParametersAreNonnullByDefault
# AutoValue is used by PSPDFKit and retains its annotations. You can safely ignore those warnings.
-dontwarn com.google.auto.value.AutoValue
# Java 8 is used by PSPDFKit. You can safely ignore those warnings produced by lambdas.
-dontwarn java.lang.invoke.**
# Error prone annotations are compile only.
-dontwarn com.google.errorprone.annotations.*
# These names must be present, since PSPDFKit uses them for availability checking of third-party dependencies.
# This list needs to be kept in sync with the list of dependencies inside PSPDFKit.java.
-keep class androidx.palette.graphics.Palette
-keep class androidx.gridlayout.widget.GridLayout
-keep class androidx.cardview.widget.CardView
-keep class io.reactivex.android.schedulers.AndroidSchedulers