1# Proguard configuration to retain stuff outside of Ink that is called
2# from JNI code via reflection (e.g. Get[Static]MethodID (including in method
3# signatures), Get[Static]FieldID, FindClass). Stuff in Ink that's
4# called this way should be annotated with Ink's @UsedByNative instead.
5# (This includes methods referenced in GetMethodID and classes in those methods'
6# signatures.)
7
8# All the classes referenced in calls to ink::jni::ThrowException. These need
9# to be preserved from pruning as well as renaming, since the objects are
10# originating on the C++ side without necessarily having a reference to the
11# class on the JVM side (though it would be extremely surprising if any
12# of these actually got pruned).
13-if class androidx.ink.nativeloader.NativeLoader
14-keep class java.lang.IllegalArgumentException {
15    <init>(java.lang.String);
16}
17
18-if class androidx.ink.nativeloader.NativeLoader
19-keep class java.lang.IllegalStateException {
20    <init>(java.lang.String);
21}
22
23-if class androidx.ink.nativeloader.NativeLoader
24-keep class java.lang.IndexOutOfBoundsException {
25    <init>(java.lang.String);
26}
27
28-if class androidx.ink.nativeloader.NativeLoader
29-keep class java.util.NoSuchElementException {
30    <init>(java.lang.String);
31}
32
33-if class androidx.ink.nativeloader.NativeLoader
34-keep class java.lang.NullPointerException {
35    <init>(java.lang.String);
36}
37
38-if class androidx.ink.nativeloader.NativeLoader
39-keep class java.lang.OutOfMemoryError {
40    <init>(java.lang.String);
41}
42
43-if class androidx.ink.nativeloader.NativeLoader
44-keep class java.lang.UnsupportedOperationException {
45    <init>(java.lang.String);
46}
47
48-if class androidx.ink.nativeloader.NativeLoader
49-keep class java.lang.Throwable {
50  public java.lang.String getMessage();
51}
52