forked from paypal/PayPal-Android-SDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproguard-paypal.cnf
95 lines (75 loc) · 3.05 KB
/
proguard-paypal.cnf
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
# If your application, applet, servlet, library, etc., contains enumeration
# classes, you'll have to preserve some special methods. Enumerations were
# introduced in Java 5. The java compiler translates enumerations into classes
# with a special structure. Notably, the classes contain implementations of some
# static methods that the run-time environment accesses by introspection (Isn't
# that just grand? Introspection is the self-modifying code of a new
# generation). You have to specify these explicitly, to make sure they aren't
# removed or obfuscated:
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
# More complex applications, applets, servlets, libraries, etc., may contain
# classes that are serialized. Depending on the way in which they are used, they
# may require special attention
-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();
}
# --- RECOMMENDED ANDROID CONFIG ------------------------------------------
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.view.View {
public <init>(android.content.Context);
public <init>(android.content.Context, android.util.AttributeSet);
public <init>(android.content.Context, android.util.AttributeSet, int);
public void set*(...);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers class * implements android.os.Parcelable {
static android.os.Parcelable$Creator CREATOR;
}
# ---- REQUIRED card.io CONFIG ----------------------------------------
# card.io is a native lib, so anything crossing JNI must not be changed
# Don't obfuscate DetectionInfo or public fields, since
# it is used by native methods
-keep class io.card.payment.DetectionInfo
-keepclassmembers class io.card.payment.DetectionInfo {
public *;
}
-keep class io.card.payment.CreditCard
-keep class io.card.payment.CreditCard$1
-keepclassmembers class io.card.payment.CreditCard {
*;
}
-keepclassmembers class io.card.payment.CardScanner {
*** onEdgeUpdate(...);
}
# Don't mess with classes with native methods
-keepclasseswithmembers class * {
native <methods>;
}
-keepclasseswithmembernames class * {
native <methods>;
}
-keep public class io.card.payment.* {
public protected *;
}
# -------- PayPal SDK ----------
# (does not include card.io)
-keep public class com.paypal.android.sdk.payments.* {
public *;
}