我的github

Android打包混淆文件模板

# This is a configuration file for ProGuard.
# http://proguard.sourceforge.net/index.html#manual/usage.html
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-dontoptimize
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-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 com.android.vending.licensing.ILicensingService
-keep public class  com.rongda.opinion.animation.ViewWrapper{*;}
-keep public class * implements java.io.Serializable {*;}
-keepclasseswithmembers class com.rongda.opinion.bean.FirstKey {    
    <fields>;    
    <methods>;    
}  
-keepclasseswithmembers class com.rongda.opinion.bean.ThirdKey {    
    <fields>;    
    <methods>;    
}  
-keepclasseswithmembers class com.rongda.opinion.bean.SecendKey {    
    <fields>;    
    <methods>;    
}  
-keepclasseswithmembernames class * {
    native <methods>;
}
#-keepclasseswithmembernames class * {
#    public <init>(android.content.Context, android.util.AttributeSet);
#}
#-keepclasseswithmembernames class * {
#    public <init>(android.content.Context, android.util.AttributeSet, int);
#}
-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;
}


# 引入的第三方jar包需要做的事情

-dontwarn android.support.**
-dontwarn com.alibaba.**
-dontwarn cn.jpush.**
-dontwarn com.umeng.**
-libraryjars libs/android-support-v4.jar
-libraryjars libs/fastjson-1.1.33.jar
-libraryjars libs/umeng-analytics-v5.2.4.jar
-libraryjars libs/jpush-sdk-release1.7.0.jar
-keep class com.alibaba.fastjson.** {*;}
-keep class com.umeng.analytics.**{*;}
-keep class cn.jpush.** { *; }




posted @ 2014-10-20 11:54  陌上尖  阅读(323)  评论(0编辑  收藏  举报