2008-01-19 00:56:12 +00:00
|
|
|
# proguard include file (http://proguard.sourceforge.net)
|
|
|
|
|
2017-07-10 16:01:56 +00:00
|
|
|
# Enums have methods and members that are called reflectively in both Avian and OpenJDK.
|
|
|
|
-keepclassmembers enum * {
|
|
|
|
**[] $VALUES;
|
|
|
|
public *;
|
|
|
|
public static **[] values();
|
|
|
|
}
|
2008-01-19 00:56:12 +00:00
|
|
|
|
2008-01-19 01:51:37 +00:00
|
|
|
# the VM depends on the fixed layout of the following classes:
|
2008-01-19 00:56:12 +00:00
|
|
|
|
2008-01-20 22:00:19 +00:00
|
|
|
-keepclassmembers class java.lang.Class { !static <fields>; }
|
|
|
|
-keepclassmembers class java.lang.ClassLoader { !static <fields>; }
|
|
|
|
-keepclassmembers class java.lang.String { !static <fields>; }
|
|
|
|
-keepclassmembers class java.lang.Thread { !static <fields>; }
|
2010-10-24 17:52:14 +00:00
|
|
|
-keepclassmembers class java.lang.ThreadGroup { !static <fields>; }
|
2008-01-20 22:00:19 +00:00
|
|
|
-keepclassmembers class java.lang.StackTraceElement { !static <fields>; }
|
|
|
|
-keepclassmembers class java.lang.Throwable { !static <fields>; }
|
|
|
|
-keepclassmembers class java.lang.Byte { !static <fields>; }
|
|
|
|
-keepclassmembers class java.lang.Boolean { !static <fields>; }
|
|
|
|
-keepclassmembers class java.lang.Short { !static <fields>; }
|
|
|
|
-keepclassmembers class java.lang.Character { !static <fields>; }
|
|
|
|
-keepclassmembers class java.lang.Integer { !static <fields>; }
|
|
|
|
-keepclassmembers class java.lang.Long { !static <fields>; }
|
|
|
|
-keepclassmembers class java.lang.Float { !static <fields>; }
|
|
|
|
-keepclassmembers class java.lang.Double { !static <fields>; }
|
|
|
|
-keepclassmembers class java.lang.ref.Reference { !static <fields>; }
|
|
|
|
-keepclassmembers class java.lang.ref.ReferenceQueue { !static <fields>; }
|
|
|
|
-keepclassmembers class java.lang.ref.WeakReference { !static <fields>; }
|
|
|
|
-keepclassmembers class java.lang.ref.PhantomReference { !static <fields>; }
|
|
|
|
-keepclassmembers class java.lang.reflect.Field { !static <fields>; }
|
|
|
|
-keepclassmembers class java.lang.reflect.Method { !static <fields>; }
|
2010-10-24 17:52:14 +00:00
|
|
|
-keepclassmembers class java.lang.reflect.Constructor { !static <fields>; }
|
|
|
|
-keepclassmembers class java.lang.reflect.AccessibleObject { !static <fields>; }
|
|
|
|
-keepclassmembers class sun.reflect.ConstantPool { !static <fields>; }
|
|
|
|
-keepclassmembers class avian.VMClass { !static <fields>; }
|
|
|
|
-keepclassmembers class avian.VMMethod { !static <fields>; }
|
|
|
|
-keepclassmembers class avian.VMField { !static <fields>; }
|
|
|
|
-keepclassmembers class avian.ClassAddendum { !static <fields>; }
|
|
|
|
-keepclassmembers class avian.MethodAddendum { !static <fields>; }
|
|
|
|
-keepclassmembers class avian.FieldAddendum { !static <fields>; }
|
|
|
|
-keepclassmembers class avian.Continuations$Continuation { !static <fields>; }
|
|
|
|
-keepclassmembers class avian.Continuations$UnwindResult { !static <fields>; }
|
2008-01-19 00:56:12 +00:00
|
|
|
|
2008-01-29 00:34:14 +00:00
|
|
|
# the VM may throw instances of the following:
|
|
|
|
|
2009-06-01 05:02:50 +00:00
|
|
|
-keep public class avian.IncompatibleContinuationException
|
2010-01-27 20:44:02 +00:00
|
|
|
-keep public class java.lang.Exception
|
2008-01-29 00:34:14 +00:00
|
|
|
-keep public class java.lang.RuntimeException
|
|
|
|
-keep public class java.lang.IllegalStateException
|
|
|
|
-keep public class java.lang.IllegalArgumentException
|
|
|
|
-keep public class java.lang.IllegalMonitorStateException
|
2010-01-27 20:44:02 +00:00
|
|
|
-keep public class java.lang.IllegalThreadStateException
|
2010-07-14 00:40:29 +00:00
|
|
|
-keep public class java.lang.IndexOutOfBoundsException
|
2008-01-29 00:34:14 +00:00
|
|
|
-keep public class java.lang.ArrayIndexOutOfBoundsException
|
|
|
|
-keep public class java.lang.ArrayStoreException
|
|
|
|
-keep public class java.lang.NegativeArraySizeException
|
2013-04-23 03:19:01 +00:00
|
|
|
-keep public class java.lang.CloneNotSupportedException
|
2008-01-29 00:34:14 +00:00
|
|
|
-keep public class java.lang.ClassCastException
|
|
|
|
-keep public class java.lang.ClassNotFoundException
|
|
|
|
-keep public class java.lang.NullPointerException
|
2010-12-20 00:47:21 +00:00
|
|
|
-keep public class java.lang.ArithmeticException
|
2008-01-29 00:34:14 +00:00
|
|
|
-keep public class java.lang.InterruptedException
|
|
|
|
-keep public class java.lang.StackOverflowError
|
|
|
|
-keep public class java.lang.NoSuchFieldError
|
|
|
|
-keep public class java.lang.NoSuchMethodError
|
2011-07-18 01:54:55 +00:00
|
|
|
-keep public class java.lang.AbstractMethodError
|
2008-01-29 00:34:14 +00:00
|
|
|
-keep public class java.lang.UnsatisfiedLinkError
|
|
|
|
-keep public class java.lang.ExceptionInInitializerError
|
|
|
|
-keep public class java.lang.OutOfMemoryError
|
2012-05-11 19:19:55 +00:00
|
|
|
-keep public class java.lang.IncompatibleClassChangeError
|
2008-01-29 00:34:14 +00:00
|
|
|
-keep public class java.lang.reflect.InvocationTargetException
|
2009-01-02 20:25:05 +00:00
|
|
|
-keep public class java.io.IOException
|
2010-01-27 20:44:02 +00:00
|
|
|
-keep public class java.io.FileNotFoundException
|
|
|
|
-keep public class java.net.SocketException
|
2014-05-20 20:12:38 +00:00
|
|
|
-keep public class java.net.UnknownHostException
|
2013-01-26 20:33:43 +00:00
|
|
|
-keep public class java.util.Locale
|
2008-01-29 00:34:14 +00:00
|
|
|
|
2008-01-19 01:51:37 +00:00
|
|
|
# ClassLoader.getSystemClassloader() depends on the existence of this class:
|
|
|
|
|
2009-06-01 04:48:38 +00:00
|
|
|
-keep class avian.SystemClassLoader
|
2008-01-19 01:51:37 +00:00
|
|
|
|
|
|
|
# the VM references these classes by name, so protect them from obfuscation:
|
|
|
|
|
|
|
|
-keepnames public class java.lang.**
|
2010-12-04 01:24:19 +00:00
|
|
|
-keepnames public class avian.**
|
2008-01-19 01:51:37 +00:00
|
|
|
|
2008-02-28 19:38:44 +00:00
|
|
|
# Don't optimize calls to ResourceBundle
|
|
|
|
-keep,allowshrinking,allowobfuscation public class java.util.ResourceBundle {
|
|
|
|
public static java.util.ResourceBundle getBundle(...);
|
|
|
|
}
|
|
|
|
|
2008-01-19 01:51:37 +00:00
|
|
|
# musn't obfuscate native method names:
|
2008-01-19 00:56:12 +00:00
|
|
|
|
|
|
|
-keepclasseswithmembernames class * {
|
|
|
|
native <methods>;
|
|
|
|
}
|
2008-01-29 00:34:14 +00:00
|
|
|
|
|
|
|
# Thread.run is called by name in the VM
|
|
|
|
|
2009-07-29 16:33:39 +00:00
|
|
|
-keepclassmembers class java.lang.Thread {
|
|
|
|
private static void run(java.lang.Thread);
|
2014-01-10 18:29:59 +00:00
|
|
|
public void run();
|
2009-07-29 16:33:39 +00:00
|
|
|
}
|
2009-06-01 05:02:50 +00:00
|
|
|
|
|
|
|
# when continuations are enabled, the VM may call these methods by name:
|
|
|
|
|
|
|
|
-keepclassmembers class avian.Continuations {
|
|
|
|
*** wind(...);
|
|
|
|
*** rewind(...);
|
|
|
|
}
|
|
|
|
|
|
|
|
-keepclassmembernames class avian.CallbackReceiver {
|
|
|
|
*** receive(...);
|
|
|
|
}
|
|
|
|
|
|
|
|
# the above methods include these classes in their signatures:
|
|
|
|
|
|
|
|
-keepnames public class avian.Callback
|
|
|
|
-keepnames public class java.util.concurrent.Callable
|
2010-10-15 23:06:03 +00:00
|
|
|
|
|
|
|
# Proguard gets confused about clone() and array classes (http://sourceforge.net/tracker/index.php?func=detail&aid=2851344&group_id=54750&atid=474704):
|
|
|
|
|
|
|
|
-keepclassmembers class java.lang.Object {
|
|
|
|
protected java.lang.Object clone();
|
|
|
|
}
|
2011-01-18 03:23:01 +00:00
|
|
|
|
|
|
|
# called by name in the VM:
|
|
|
|
|
|
|
|
-keepclassmembers class java.lang.ClassLoader {
|
|
|
|
public java.lang.Class loadClass(java.lang.String);
|
|
|
|
}
|
2017-02-01 14:52:10 +00:00
|
|
|
|
|
|
|
-keepclassmembers class avian.Classes {
|
|
|
|
public java.security.ProtectionDomain getProtectionDomain(avian.VMClass);
|
|
|
|
}
|