mirror of
https://github.com/corda/corda.git
synced 2025-01-01 02:36:44 +00:00
initial work towards ProGuard-enabled OpenJDK builds
This commit is contained in:
parent
25ca40931d
commit
cdcc9caeb2
104
openjdk.pro
Normal file
104
openjdk.pro
Normal file
@ -0,0 +1,104 @@
|
||||
# proguard include file (http://proguard.sourceforge.net)
|
||||
|
||||
# This file is for use in combination with vm.pro when ProGuarding
|
||||
# OpenJDK-based builds
|
||||
|
||||
# the following methods and fields are refered to by name in the VM:
|
||||
|
||||
-keepclassmembers class java.lang.Thread {
|
||||
public void run();
|
||||
}
|
||||
|
||||
-keep class java.lang.System {
|
||||
private static void initializeSystemClass();
|
||||
}
|
||||
|
||||
-keep class java.lang.ClassLoader {
|
||||
private static java.lang.ClassLoader scl;
|
||||
private static boolean sclSet;
|
||||
|
||||
protected ClassLoader(java.lang.ClassLoader);
|
||||
}
|
||||
|
||||
-keep class java.util.Properties {
|
||||
public java.lang.Object setProperty(java.lang.String, java.lang.String);
|
||||
}
|
||||
|
||||
-keep class avian.OpenJDK {
|
||||
public static java.security.ProtectionDomain getProtectionDomain();
|
||||
}
|
||||
|
||||
-keepclassmembers public class java.security.PrivilegedAction {
|
||||
public java.lang.Object run();
|
||||
}
|
||||
|
||||
-keepclassmembers public class * implements java.security.PrivilegedAction {
|
||||
public java.lang.Object run();
|
||||
}
|
||||
|
||||
-keepclassmembers public class java.security.PrivilegedExceptionAction {
|
||||
public java.lang.Object run();
|
||||
}
|
||||
|
||||
-keepclassmembers public class * implements java.security.PrivilegedExceptionAction {
|
||||
public java.lang.Object run();
|
||||
}
|
||||
|
||||
-keep public class java.security.PrivilegedActionException {
|
||||
public PrivilegedActionException(java.lang.Exception);
|
||||
}
|
||||
|
||||
# these class names are used to disambiguate JNI method lookups:
|
||||
|
||||
-keepnames public class java.security.PrivilegedAction
|
||||
-keepnames public class java.security.PrivilegedExceptionAction
|
||||
-keepnames public class java.security.AccessControlContext
|
||||
|
||||
# the following methods and fields are refered to by name in the OpenJDK
|
||||
# native code:
|
||||
|
||||
-keep class java.util.Properties {
|
||||
public java.lang.Object put(java.lang.Object, java.lang.Object);
|
||||
}
|
||||
|
||||
-keepclassmembers class * {
|
||||
public boolean equals(java.lang.Object);
|
||||
public void wait();
|
||||
public void notify();
|
||||
public void notifyAll();
|
||||
public java.lang.String toString();
|
||||
}
|
||||
|
||||
-keepclassmembers class java.lang.String {
|
||||
public String(byte[]);
|
||||
public String(byte[], java.lang.String);
|
||||
public byte[] getBytes();
|
||||
public byte[] getBytes(java.lang.String);
|
||||
}
|
||||
|
||||
-keepclassmembers class java.io.FileDescriptor {
|
||||
private int fd;
|
||||
}
|
||||
|
||||
-keepclassmembers class java.io.FileInputStream {
|
||||
private java.io.FileDescriptor fd;
|
||||
}
|
||||
|
||||
-keepclassmembers class java.io.FileOutputStream {
|
||||
private java.io.FileDescriptor fd;
|
||||
}
|
||||
|
||||
# ProGuard will not realize AtomicInteger.value is changed from native
|
||||
# code unless we tell it (todo: handle other Atomic* classes)
|
||||
-keepclassmembers class java.util.concurrent.atomic.AtomicInteger {
|
||||
private int value;
|
||||
}
|
||||
|
||||
# this field as accessed via an AtomicReferenceFieldUpdater:
|
||||
-keepclassmembers class java.io.BufferedInputStream {
|
||||
protected byte[] buf;
|
||||
}
|
||||
|
||||
|
||||
|
||||
# (to be continued...)
|
12
vm.pro
12
vm.pro
@ -12,6 +12,7 @@
|
||||
-keepclassmembers class java.lang.ClassLoader { !static <fields>; }
|
||||
-keepclassmembers class java.lang.String { !static <fields>; }
|
||||
-keepclassmembers class java.lang.Thread { !static <fields>; }
|
||||
-keepclassmembers class java.lang.ThreadGroup { !static <fields>; }
|
||||
-keepclassmembers class java.lang.StackTraceElement { !static <fields>; }
|
||||
-keepclassmembers class java.lang.Throwable { !static <fields>; }
|
||||
-keepclassmembers class java.lang.Byte { !static <fields>; }
|
||||
@ -28,6 +29,17 @@
|
||||
-keepclassmembers class java.lang.ref.PhantomReference { !static <fields>; }
|
||||
-keepclassmembers class java.lang.reflect.Field { !static <fields>; }
|
||||
-keepclassmembers class java.lang.reflect.Method { !static <fields>; }
|
||||
-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>; }
|
||||
|
||||
# the VM may throw instances of the following:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user