forked from ReadyTalk/avian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openjdk.pro
350 lines (281 loc) · 8.87 KB
/
openjdk.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
# 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();
}
-keepclassmembers class java.lang.ThreadGroup {
void threadTerminated(java.lang.Thread);
}
-keep class java.lang.System {
private static void initializeSystemClass();
public static void setProperties(java.util.Properties);
}
-keep class sun.misc.Launcher {
public static sun.misc.Launcher getLauncher();
}
-keep class java.lang.ClassLoader {
private static java.lang.ClassLoader scl;
private static boolean sclSet;
protected ClassLoader(java.lang.ClassLoader);
}
-keep class avian.SystemClassLoader {
protected java.net.URL findResource(java.lang.String);
}
-keepnames class java.lang.ClassLoader {
public java.lang.Class loadClass(java.lang.String);
static void loadLibrary(java.lang.Class, java.lang.String, boolean);
private static java.net.URL getBootstrapResource(java.lang.String);
private static java.util.Enumeration getBootstrapResources(java.lang.String);
}
-keep class java.util.Properties {
public java.lang.Object setProperty(java.lang.String, java.lang.String);
public java.lang.String getProperty(java.lang.String);
}
-keep class java.util.Hashtable {
public java.lang.Object remove(java.lang.Object);
}
-keep class avian.OpenJDK {
<methods>;
}
-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.net.URL
-keepnames public class java.util.Enumeration
-keepnames public class java.security.ProtectionDomain
-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.lang.Boolean {
public boolean getBoolean(java.lang.String);
}
-keepclassmembers class java.util.zip.Inflater {
long strm;
boolean needDict;
boolean finished;
byte[] buf;
int off;
int len;
}
-keepclassmembers class java.io.FileDescriptor {
private int fd;
private long handle;
}
-keep class java.net.NetworkInterface {
<fields>;
}
-keep class java.net.InetAddress {
<fields>;
}
-keep class java.net.Inet4Address {
<fields>;
}
-keep class java.net.Inet4AddressImpl
-keep class java.net.Inet6Address {
<fields>;
}
-keep class java.net.Inet6AddressImpl
-keep class java.net.InetSocketAddress {
public InetSocketAddress(java.net.InetAddress, int);
}
-keep class java.net.ServerSocket
-keep class java.net.SocketTimeoutException
-keepclassmembers class java.net.PlainSocketImpl {
<fields>;
}
-keepclassmembers class java.net.TwoStacksPlainSocketImpl {
*** fd1;
*** lastfd;
}
-keepclassmembers class java.net.AbstractPlainSocketImpl {
*** timeout;
*** trafficClass;
}
-keepclassmembers class java.net.SocketImpl {
*** serverSocket;
*** fd;
*** address;
*** port;
*** localport;
}
-keepclassmembers class java.io.FileInputStream {
private java.io.FileDescriptor fd;
}
-keepclassmembers class java.io.FileOutputStream {
private java.io.FileDescriptor fd;
private boolean append;
}
# changed in native code via sun.misc.Unsafe (todo: handle other
# Atomic* classes)
-keepclassmembers class java.util.concurrent.atomic.AtomicInteger {
private int value;
}
# avoid inlining due to access check using a fixed offset into call stack:
-keep,allowshrinking,allowobfuscation class java.util.concurrent.atomic.AtomicReferenceFieldUpdater {
*** newUpdater(...);
}
# accessed reflectively via an AtomicReferenceFieldUpdater:
-keepclassmembers class java.io.BufferedInputStream {
protected byte[] buf;
}
-keep class java.lang.System {
public static java.io.InputStream in;
public static java.io.PrintStream out;
public static java.io.PrintStream err;
# avoid inlining due to access check using fixed offset into call stack:
static java.lang.Class getCallerClass();
# called from jni_util.c:
static java.lang.String getProperty(java.lang.String);
}
# refered to by name from native code:
-keepnames public class java.io.InputStream
-keepnames public class java.io.PrintStream
# avoid inlining due to access check using fixed offset into call stack:
-keep,allowshrinking,allowobfuscation class java.lang.System {
static java.lang.Class getCallerClass();
}
-keep class java.io.UnixFileSystem {
public UnixFileSystem();
}
-keep class java.io.WinNTFileSystem {
public WinNTFileSystem();
}
-keep class java.io.File {
private java.lang.String path;
}
-keepclassmembers class java.lang.ClassLoader$NativeLibrary {
long handle;
private int jniVersion;
}
-keep class java.nio.charset.Charset {
# called from jni_util.c:
boolean isSupported(java.lang.String);
}
# Charsets are loaded via reflection. If you need others besides
# UTF-8, you'll need to add them (e.g. sun.nio.cs.ISO_8859_1).
-keep class sun.nio.cs.UTF_8
# loaded reflectively to handle embedded resources:
-keep class avian.avianvmresource.Handler
# loaded reflectively by sun.misc.Launcher:
-keep class avian.file.Handler
# refered to symbolically in MethodAccessorGenerator:
-keep class sun.reflect.MethodAccessorImpl {
<methods>;
}
-keep class sun.reflect.ConstructorAccessorImpl {
<methods>;
}
-keep class sun.reflect.SerializationConstructorAccessorImpl {
<methods>;
}
# referred to by name in LocaleData to load resources:
-keep class sun.util.resources.CalendarData
-keep class sun.util.resources.TimeZoneNames
-keep class sun.text.resources.FormatData
# loaded via reflection from DefaultFileSystemProvider:
-keep class sun.nio.fs.LinuxFileSystemProvider
-keep class sun.nio.fs.BsdFileSystemProvider
# loaded via JNI in UnixNativeDispatcher.c:
-keep class sun.nio.fs.UnixFileAttributes {
<fields>;
}
-keep class sun.nio.fs.UnixFileStoreAttributes {
<fields>;
}
-keep class sun.nio.fs.UnixMountEntry {
<fields>;
}
-keep class sun.nio.fs.UnixException {
UnixException(int);
}
-keep class sun.net.www.protocol.jar.Handler
# These concurrent classes refer to certain members reflectively in their static initializers
-keepclassmembers class java.util.concurrent.ConcurrentHashMap$HashEntry {
*** next;
}
-keepclassmembers class java.util.concurrent.CopyOnWriteArrayList {
*** lock;
}
-keepclassmembers class java.util.concurrent.CountDownLatch {
*** allocationSpinLock;
}
-keepclassmembers class java.util.concurrent.PriorityBlockingQueue {
*** allocationSpinLock;
}
-keepclassmembers class java.util.concurrent.SynchronousQueue$TransferStack {
*** head;
}
-keepclassmembers class java.util.concurrent.ConcurrentLinkedQueue {
*** head;
*** tail;
}
-keepclassmembers class java.util.concurrent.ConcurrentLinkedQueue$Node {
*** item;
*** next;
}
-keepclassmembers class java.util.concurrent.SynchronousQueue$TransferStack$SNode {
*** match;
*** next;
}
# These classes are accessed via bytecode generated on the fly.
-keepclassmembers class java.lang.reflect.Proxy {
<methods>;
}
-keepclassmembers class java.lang.reflect.InvocationHandler {
<methods>;
}
# Don't strip special enum members.
-keepclassmembers,allowoptimization enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keepclassmembers class java.lang.reflect.Executable {
<methods>;
}
# Needed to create temporary file paths, amongst other things.
-keep class sun.security.provider.NativePRNG
-keep class sun.security.provider.SHA
# Character set codecs
-keep class sun.nio.cs.ISO_8859_1
-keep class sun.nio.cs.UTF_8
-keep class sun.nio.cs.UTF_16
-keep class sun.nio.cs.UTF_16BE
-keep class sun.nio.cs.UTF_16LE
-keep class sun.nio.cs.US_ASCII
# Accessed from native code
-keep class java.util.zip.Deflater {
<fields>;
}