xref: /aosp_15_r20/external/guava/proguard/concurrent.pro (revision fb5080426417cab6bd44d0ed3f37e47d42859579)
1# Futures.getChecked, in both of its variants, is incompatible with proguard.
2
3# Used by AtomicReferenceFieldUpdater and sun.misc.Unsafe
4-keepclassmembers class com.google.common.util.concurrent.AbstractFuture** {
5  *** waiters;
6  *** value;
7  *** listeners;
8  *** thread;
9  *** next;
10}
11-keepclassmembers class com.google.common.util.concurrent.AtomicDouble {
12  *** value;
13}
14-keepclassmembers class com.google.common.util.concurrent.AggregateFutureState {
15  *** remaining;
16  *** seenExceptions;
17}
18
19# Since Unsafe is using the field offsets of these inner classes, we don't want
20# to have class merging or similar tricks applied to these classes and their
21# fields. It's safe to allow obfuscation, since the by-name references are
22# already preserved in the -keep statement above.
23-keep,allowshrinking,allowobfuscation class com.google.common.util.concurrent.AbstractFuture** {
24  <fields>;
25}
26
27# AbstractFuture uses this
28-dontwarn sun.misc.Unsafe
29
30# MoreExecutors references AppEngine
31-dontnote com.google.appengine.api.ThreadManager
32-keep class com.google.appengine.api.ThreadManager {
33  static *** currentRequestThreadFactory(...);
34}
35-dontnote com.google.apphosting.api.ApiProxy
36-keep class com.google.apphosting.api.ApiProxy {
37  static *** getCurrentEnvironment (...);
38}
39
40-dontwarn java.lang.SafeVarargs
41