Skip to content

Commit 3eda645

Browse files
committed
add proguard optimization script
1 parent e935928 commit 3eda645

1 file changed

Lines changed: 73 additions & 0 deletions

File tree

app/proguard-rules.pro

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in /home/n8fr8/dev/android/sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
18+
19+
-optimizationpasses 5
20+
-dontusemixedcaseclassnames
21+
-dontskipnonpubliclibraryclasses
22+
-dontskipnonpubliclibraryclassmembers
23+
-dontpreverify
24+
-verbose
25+
-repackageclasses ''
26+
-allowaccessmodification
27+
-keepattributes *Annotation*
28+
29+
-injars libs
30+
31+
-outjars bin/classes-processed.jar
32+
33+
-dontwarn javax.naming.**
34+
-dontwarn android.support.**
35+
36+
37+
####
38+
-keep class org.** { *; }
39+
-keep class org.spongycastle.**
40+
41+
-keep public class * extends android.app.Activity
42+
-keep public class * extends android.app.Application
43+
-keep public class * extends android.app.Service
44+
-keep public class * extends android.content.BroadcastReceiver
45+
-keep public class * extends android.content.ContentProvider
46+
-keep public class * extends android.app.backup.BackupAgentHelper
47+
-keep public class * extends android.preference.Preference
48+
-keep public class com.android.vending.licensing.ILicensingService
49+
50+
-keepclasseswithmembernames class * {
51+
native <methods>;
52+
}
53+
54+
-keepclasseswithmembers class * {
55+
public <init>(android.content.Context, android.util.AttributeSet);
56+
}
57+
58+
-keepclasseswithmembers class * {
59+
public <init>(android.content.Context, android.util.AttributeSet, int);
60+
}
61+
62+
-keepclassmembers class * extends android.app.Activity {
63+
public void *(android.view.View);
64+
}
65+
66+
-keepclassmembers enum * {
67+
public static **[] values();
68+
public static ** valueOf(java.lang.String);
69+
}
70+
71+
-keep class * implements android.os.Parcelable {
72+
public static final android.os.Parcelable$Creator *;
73+
}

0 commit comments

Comments
 (0)