Advertisement
andrzejiwaniuk

Proguard - zamazywanie kody Android

Apr 14th, 2016
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.50 KB | None | 0 0
  1. #PROGUARD#
  2. ####################################################################################################
  3. ####################################################################################################
  4. ####################################################################################################
  5. ######################################### PROGUARD #################################################
  6. ####################################################################################################
  7. ####################################################################################################
  8. ####################################################################################################
  9.  
  10. # This is a configuration file for ProGuard.
  11. # http://proguard.sourceforge.net/index.html#manual/usage.html
  12. -dontusemixedcaseclassnames
  13. -dontskipnonpubliclibraryclasses
  14. -verbose
  15.  
  16. # Optimization is turned off by default. Dex does not like code run
  17. # through the ProGuard optimize and preverify steps (and performs some
  18. # of these optimizations on its own).
  19. #-dontoptimize
  20. #-dontpreverify
  21.  
  22. # If you want to enable optimization, you should include the
  23. # following:
  24. -optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/*
  25. -optimizationpasses 5
  26. -allowaccessmodification
  27. #
  28. # Note that you cannot just include these flags in your own
  29. # configuration file; if you are including this file, optimization
  30. # will be turned off. You'll need to either edit this file, or
  31. # duplicate the contents of this file and remove the include of this
  32. # file from your project's proguard.config path property.
  33.  
  34. -keep public class * extends android.app.Activity
  35. -keep public class * extends android.app.Application
  36. -keep public class * extends android.app.Service
  37. -keep public class * extends android.content.BroadcastReceiver
  38. -keep public class * extends android.content.ContentProvider
  39. -keep public class * extends android.app.backup.BackupAgent
  40. -keep public class * extends android.preference.Preference
  41. -keep public class * extends android.support.v4.app.Fragment
  42. -keep public class * extends android.support.v4.app.DialogFragment
  43. -keep public class * extends com.actionbarsherlock.app.SherlockListFragment
  44. -keep public class * extends com.actionbarsherlock.app.SherlockFragment
  45. -keep public class * extends com.actionbarsherlock.app.SherlockFragmentActivity
  46. -keep public class * extends android.app.Fragment
  47. -keep public class com.android.vending.licensing.ILicensingService
  48.  
  49. # For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
  50. -keepclasseswithmembernames class * {
  51. native <methods>;
  52. }
  53.  
  54. -keep public class * extends android.view.View {
  55. public <init>(android.content.Context);
  56. public <init>(android.content.Context, android.util.AttributeSet);
  57. public <init>(android.content.Context, android.util.AttributeSet, int);
  58. public void set*(...);
  59. }
  60.  
  61. -keepclasseswithmembers class * {
  62. public <init>(android.content.Context, android.util.AttributeSet);
  63. }
  64.  
  65. -keepclasseswithmembers class * {
  66. public <init>(android.content.Context, android.util.AttributeSet, int);
  67. }
  68.  
  69. -keepclassmembers class * extends android.app.Activity {
  70. public void *(android.view.View);
  71. }
  72.  
  73. # For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
  74. -keepclassmembers enum * {
  75. public static **[] values();
  76. public static ** valueOf(java.lang.String);
  77. }
  78.  
  79. -keep class * implements android.os.Parcelable {
  80. public static final android.os.Parcelable$Creator *;
  81. }
  82.  
  83. -keepclassmembers class **.R$* {
  84. public static <fields>;
  85. }
  86.  
  87. -keep class android.support.v4.app.** { *; }
  88. -keep interface android.support.v4.app.** { *; }
  89. -keep class com.actionbarsherlock.** { *; }
  90. -keep interface com.actionbarsherlock.** { *; }
  91. # The support library contains references to newer platform versions.
  92. # Don't warn about those in case this app is linking against an older
  93. # platform version. We know about them, and they are safe.
  94. -dontwarn android.support.**
  95. -dontwarn com.google.ads.**
  96.  
  97. -dontwarn android.support.v7.**
  98. -keep class android.support.v7.** { *; }
  99. -keep interface android.support.v7.** { *; }
  100. -keep public class com.google.android.gms.**
  101. -dontwarn butterknife.**
  102. -dontwarn android.support.**
  103. -dontwarn com.github.**
  104. -dontwarn com.squareup.picasso.**
  105. -dontwarn com.etsy.android.grid.**
  106.  
  107. -dontwarn org.apache.http.**
  108. -dontwarn android.net.http.AndroidHttpClient
  109. -dontwarn com.google.android.gms.**
  110. -dontwarn com.android.volley.toolbox.**
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement