Created
October 29, 2013 08:55
-
-
Save border/7211181 to your computer and use it in GitHub Desktop.
proguard for android
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-optimizationpasses 5 # 指定代码的压缩级别 | |
-dontusemixedcaseclassnames # 是否使用大小写混合 | |
-dontskipnonpubliclibraryclasses # 是否混淆第三方jar | |
-dontpreverify # 混淆时是否做预校验 | |
-keepattributes SourceFile,LineNumberTable # 混淆号错误信息里带上代码行 | |
-verbose # 混淆时是否记录日志 | |
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* # 混淆时所采用的算法 | |
-libraryjars libs/android_api.jar | |
-libraryjars libs/baidumapapi_v2_2_0.jar | |
-libraryjars libs/armeabi.jar | |
-libraryjars libs/locSDK_3.1.jar | |
-libraryjars libs/pushservice-2.4.0.jar | |
# Baidu Map | |
-keep class com.baidu.mapapi.** {*; } | |
-keep class com.baidu.location.** {*; } | |
-keep class com.baidu.platform.** {*; } | |
-keep class com.baidu.vi.** {*; } | |
-keep class vi.com.gdi.bgl.android.java.** {*; } | |
# Baidu Push | |
-keep class com.baidu.android.** {*; } | |
-keep class com.baidu.loctp.** {*; } | |
-keep class com.nineoldandroids.** {*; } | |
# Baidu Tongji | |
-keep class com.baidu.a.a.a.** {*; } | |
-keep class com.baidu.mobstat.** {*; } | |
# slidingmenu | |
-keep class com.jeremyfeinstein.slidingmenu.lib.** {*; } | |
# listviewAnimations | |
-keep class com.haarman.listviewanimations.** {*; } | |
# http client | |
-keep class org.apache.http.** {*; } | |
-keep class android.** {*; } | |
-keep public class * extends android.view | |
-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.pm # 保持哪些类不被混淆 | |
-keep public class * extends android.content.BroadcastReceiver # 保持哪些类不被混淆 | |
-keep public class * extends android.content.ContentProvider # 保持哪些类不被混淆 | |
-keep public class * extends android.app.backup.BackupAgentHelper # 保持哪些类不被混淆 | |
-keep public class * extends android.preference.Preference # 保持哪些类不被混淆 | |
-keep public class com.android.vending.licensing.ILicensingService # 保持哪些类不被混淆 | |
#ACRA specifics | |
# we need line numbers in our stack traces otherwise they are pretty useless | |
-renamesourcefileattribute SourceFile | |
-keepattributes SourceFile,LineNumberTable | |
# ACRA needs "annotations" so add this... | |
-keepattributes *Annotation* | |
-keepclasseswithmembernames class * { # 保持 native 方法不被混淆 | |
native <methods>; | |
} | |
-keepclasseswithmembers class * { # 保持自定义控件类不被混淆 | |
public <init>(android.content.Context, android.util.AttributeSet); | |
} | |
-keepclasseswithmembers class * { | |
public <init>(android.content.Context, android.util.AttributeSet, int); # 保持自定义控件类不被混淆 | |
} | |
-keepclasseswithmembers class * { | |
void onClick*(...); | |
} | |
-keepclasseswithmembers class * { | |
*** *Callback(...); | |
} | |
# keep setters in Views so that animations can still work. | |
# see http://proguard.sourceforge.net/manual/examples.html#beans | |
-keepclassmembers public class * extends android.view.View { | |
void set*(***); | |
*** get*(); | |
} | |
-keepclassmembers class * extends android.app.Activity { # 保持自定义控件类不被混淆 | |
public void *(android.view.View); | |
} | |
-keepclassmembers enum * { # 保持枚举 enum 类不被混淆 | |
public static **[] values(); | |
public static ** valueOf(java.lang.String); | |
} | |
-keep class * implements android.os.Parcelable { # 保持 Parcelable 不被混淆 | |
public static final android.os.Parcelable$Creator *; | |
} | |
-keepclassmembers class **.R$* { | |
public static <fields>; | |
} | |
# kvbian | |
-keep class com.kvbian.picJNI.class { *;} | |
-keepclasseswithmembers class com.kvbian.db.** { | |
<fields>; | |
<methods>; | |
} | |
-dontwarn android.support.** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment