-
Notifications
You must be signed in to change notification settings - Fork 18
/
proguard.cfg
74 lines (61 loc) · 2.61 KB
/
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
-dontpreverify
#-printmapping mapping.txt
# Keep line numbers so they appear in the stack trace of the develeper console
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable
# The -optimizations option disables some arithmetic simplifications that Dalvik 1.0 and 1.5 can't handle.
-optimizations !code/simplification/arithmetic
# Activities, services and broadcast receivers are specified in the manifest file so they won't be automatically included
-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 kernel listener
#-keep class android.os.UEventObserver
#-keepclassmembers class android.os.**
-keep class android.os.** {
*;
}
-keep class com.nkahoang.kernelswitchobserver.** {
*;
}
-keep class * extends android.content.BroadcastReceiver {
*;
}
#-keepclassmembers class com.nkahoang.kernelswitchobserver.**
#-keepclassmembers public class * extends android.os.UEventObserver
-keep class android.support.**
# Custom view components might be accessed from your layout files
-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*(...);
}
# event handlers can be specified in the layout files e.g. android:onClick="nextButton_onClick", I borrowed this method name notation from .NET
-keepclassmembers class * extends android.app.Activity {
public void *_*(android.view.View);
}
#-keepclassmembers class com.nkahoang.screenstandby.VolumeKeyDetector
# Parcelable implementations are accessed by introspection
-keepclassmembers class * implements android.os.Parcelable {
static android.os.Parcelable$Creator CREATOR;
}
-keepclasseswithmembernames class * {
native <methods>;
}
# You might want to keep your annotations
-keepattributes *Annotation*
# I use Google Guava in my app
# see http://code.google.com/p/guava-libraries/wiki/UsingProGuardWithGuava
-keep class com.google.ads** { *; }
-dontwarn com.google.ads.**
-dontwarn **CompatHoneycomb
-dontwarn android.support.v4.**
-keep public class * extends android.support.v4.app.Fragment
# Hold onto the mapping.text file, it can be used to unobfuscate stack traces in the developer console using the retrace tool
-dump proguard/class_files.txt
-printseeds proguard/seeds.txt
-printusage proguard/unused.txt
-printmapping proguard/mapping.txt