fork(1) download
  1. # By default, the flags in this file are appended to flags specified
  2. # in /usr/share/android-studio/data/sdk/tools/proguard/proguard-android.txt
  3.  
  4. # For more details, see
  5. # http://d...content-available-to-author-only...d.com/guide/developing/tools/proguard.html
  6.  
  7. ##---------------Begin: proguard configuration common for all Android apps ----------
  8. -optimizationpasses 5
  9. -dontusemixedcaseclassnames
  10. -dontskipnonpubliclibraryclasses
  11. -dontskipnonpubliclibraryclassmembers
  12. -dontpreverify
  13. -verbose
  14. -dump class_files.txt
  15. -printseeds seeds.txt
  16. -printusage unused.txt
  17. -printmapping mapping.txt
  18. -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
  19.  
  20. -allowaccessmodification
  21. -keepattributes *Annotation*
  22. -renamesourcefileattribute SourceFile
  23. -keepattributes SourceFile,LineNumberTable
  24. -repackageclasses ''
  25.  
  26. -keep public class * extends android.app.Activity
  27. -keep public class * extends android.app.Application
  28. -keep public class * extends android.app.Service
  29. -keep public class * extends android.content.BroadcastReceiver
  30. -keep public class * extends android.content.ContentProvider
  31. -keep public class * extends android.app.backup.BackupAgentHelper
  32. -keep public class * extends android.preference.Preference
  33. -keep public class com.android.vending.licensing.ILicensingService
  34. -dontnote com.android.vending.licensing.ILicensingService
  35.  
  36. # Explicitly preserve all serialization members. The Serializable interface
  37. # is only a marker interface, so it wouldn't save them.
  38. -keepclassmembers class * implements java.io.Serializable {
  39.   static final long serialVersionUID;
  40.   private static final java.io.ObjectStreamField[] serialPersistentFields;
  41.   private void writeObject(java.io.ObjectOutputStream);
  42.   private void readObject(java.io.ObjectInputStream);
  43.   java.lang.Object writeReplace();
  44.   java.lang.Object readResolve();
  45. }
  46.  
  47. # Preserve all native method names and the names of their classes.
  48. -keepclasseswithmembernames class * {
  49.   native <methods>;
  50. }
  51.  
  52. -keepclasseswithmembernames class * {
  53.   public <init>(android.content.Context, android.util.AttributeSet);
  54. }
  55.  
  56. -keepclasseswithmembernames class * {
  57.   public <init>(android.content.Context, android.util.AttributeSet, int);
  58. }
  59.  
  60. # Preserve static fields of inner classes of R classes that might be accessed
  61. # through introspection.
  62. -keepclassmembers class **.R$* {
  63.   public static <fields>;
  64. }
  65.  
  66. # Preserve the special static methods that are required in all enumeration classes.
  67. -keepclassmembers enum * {
  68.   public static **[] values();
  69.   public static ** valueOf(java.lang.String);
  70. }
  71.  
  72. -keep public class * {
  73.   public protected *;
  74. }
  75.  
  76. -keep class * implements android.os.Parcelable {
  77.   public static final android.os.Parcelable$Creator *;
  78. }
  79. ##---------------End: proguard configuration common for all Android apps ----------
  80.  
  81. #---------------Begin: proguard configuration for support library ----------
  82. -keep class android.support.v4.app.** { *; }
  83. -keep interface android.support.v4.app.** { *; }
  84. -keep class com.actionbarsherlock.** { *; }
  85. -keep interface com.actionbarsherlock.** { *; }
  86.  
  87. # The support library contains references to newer platform versions.
  88. # Don't warn about those in case this app is linking against an older
  89. # platform version. We know about them, and they are safe.
  90. -dontwarn android.support.**
  91. -dontwarn com.google.ads.**
  92. ##---------------End: proguard configuration for Gson ----------
  93.  
  94. ##---------------Begin: proguard configuration for Gson ----------
  95. # Gson uses generic type information stored in a class file when working with fields. Proguard
  96. # removes such information by default, so configure it to keep all of it.
  97. -keepattributes Signature
  98.  
  99. # For using GSON @Expose annotation
  100. -keepattributes *Annotation*
  101.  
  102. # Gson specific classes
  103. -keep class sun.misc.Unsafe { *; }
  104. #-keep class com.google.gson.stream.** { *; }
  105.  
  106. # Application classes that will be serialized/deserialized over Gson
  107. -keep class com.example.model.** { *; }
  108.  
  109. ##---------------End: proguard configuration for Gson ----------
  110.  
  111. # If your project uses WebView with JS, uncomment the following
  112. # and specify the fully qualified class name to the JavaScript interface
  113. # class:
  114. #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
  115. # public *;
  116. #}
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: illegal character: '#'
# By default, the flags in this file are appended to flags specified
^
Main.java:1: error: class, interface, or enum expected
# By default, the flags in this file are appended to flags specified
            ^
Main.java:2: error: illegal character: '#'
# in /usr/share/android-studio/data/sdk/tools/proguard/proguard-android.txt
^
Main.java:4: error: illegal character: '#'
# For more details, see
^
Main.java:5: error: illegal character: '#'
#   http://developer.android.com/guide/developing/tools/proguard.html
^
Main.java:7: error: illegal character: '#'
##---------------Begin: proguard configuration common for all Android apps ----------
^
Main.java:7: error: illegal character: '#'
##---------------Begin: proguard configuration common for all Android apps ----------
 ^
Main.java:18: error: unclosed comment
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
                                                     ^
8 errors
stdout
Standard output is empty