ProGuard文件中的所有声明都有什么作用?

时间:2017-04-03 09:31:01

标签: android proguard

我有Proguard配置文件但我无法理解每个声明的含义,因为在Android SDK中没有正确记录。如果有人理解其含义可以帮助我理解每个声明。

-optimizationpasses 5

-dontusemixedcaseclassnames

-dontskipnonpubliclibraryclasses

-verbose

-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*

-dontpreverify

-repackageclasses ''

-allowaccessmodification

-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


-keepattributes *Annotation*

-keepclassmembers class * extends android.content.Context {
    public void *(android.view.View);
    public void *(android.view.MenuItem);
}

-keepclassmembers class * {
    @android.webkit.JavascriptInterface <methods>;
}



-keepattributes Signature

-keep class sun.misc.Unsafe { *; }

-assumenosideeffects class android.util.Log {
    public static *** d(...);
    public static *** v(...);
}


-keepclasseswithmembernames class * {
    native <methods>;
}


-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 enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}


-keep class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;
}


-keepclassmembers class **.R$* {
    public static <fields>;
}

0 个答案:

没有答案