|
1 |
| -# Keep all classes implemeting the RealmObject interface |
2 |
| --keep class io.realm.kotlin.types.RealmObject |
3 |
| --keep class * implements io.realm.kotlin.types.RealmObject { *; } |
4 |
| - |
5 |
| -# Keep all classes implemeting the EmbeddedRealmObject interface |
6 |
| --keep class io.realm.kotlin.types.EmbeddedRealmObject |
7 |
| --keep class * implements io.realm.kotlin.types.EmbeddedRealmObject { *; } |
| 1 | +## Keep Companion classes and class.Companion member of all classes that can be used in our API to |
| 2 | +# allow calling realmObjectCompanionOrThrow and realmObjectCompanionOrNull on the classes |
| 3 | +-keep class io.realm.kotlin.types.ObjectId$Companion |
| 4 | +-keepclassmembers class io.realm.kotlin.types.ObjectId { |
| 5 | + io.realm.kotlin.types.ObjectId$Companion Companion; |
| 6 | +} |
| 7 | +-keep class io.realm.kotlin.types.RealmInstant$Companion |
| 8 | +-keepclassmembers class io.realm.kotlin.types.RealmInstant { |
| 9 | + io.realm.kotlin.types.RealmInstant$Companion Companion; |
| 10 | +} |
| 11 | +-keep class org.mongodb.kbson.BsonObjectId$Companion |
| 12 | +-keepclassmembers class org.mongodb.kbson.BsonObjectId { |
| 13 | + org.mongodb.kbson.BsonObjectId$Companion Companion; |
| 14 | +} |
| 15 | +-keep class io.realm.kotlin.dynamic.DynamicRealmObject$Companion, io.realm.kotlin.dynamic.DynamicMutableRealmObject$Companion |
| 16 | +-keepclassmembers class io.realm.kotlin.dynamic.DynamicRealmObject, io.realm.kotlin.dynamic.DynamicMutableRealmObject { |
| 17 | + **$Companion Companion; |
| 18 | +} |
| 19 | +-keep,allowobfuscation class ** implements io.realm.kotlin.types.BaseRealmObject |
| 20 | +-keep class ** implements io.realm.kotlin.internal.RealmObjectCompanion |
| 21 | +-keepclassmembers class ** implements io.realm.kotlin.types.BaseRealmObject { |
| 22 | + **$Companion Companion; |
| 23 | +} |
8 | 24 |
|
9 |
| -# Preserve all native method names and the names of their classes. |
| 25 | +## Preserve all native method names and the names of their classes. |
10 | 26 | -keepclasseswithmembernames,includedescriptorclasses class * {
|
11 | 27 | native <methods>;
|
12 | 28 | }
|
13 | 29 |
|
| 30 | +## Preserve all classes that are looked up from native code |
14 | 31 | # Notification callback
|
15 | 32 | -keep class io.realm.kotlin.internal.interop.NotificationCallback {
|
16 | 33 | *;
|
17 | 34 | }
|
18 |
| - |
19 | 35 | # Utils to convert core errors into Kotlin exceptions
|
20 | 36 | -keep class io.realm.kotlin.internal.interop.CoreErrorUtils {
|
21 | 37 | *;
|
22 | 38 | }
|
23 |
| - |
24 | 39 | -keep class io.realm.kotlin.internal.interop.JVMScheduler {
|
25 | 40 | *;
|
26 | 41 | }
|
27 |
| - |
28 |
| -# Prevent all RealmObjects from having their companions stripped |
29 |
| --keep class ** implements io.realm.kotlin.internal.RealmObjectCompanion { |
30 |
| - *; |
31 |
| -} |
32 |
| - |
33 | 42 | # Interop, sync-specific classes
|
34 | 43 | -keep class io.realm.kotlin.internal.interop.sync.NetworkTransport {
|
35 | 44 | # TODO OPTIMIZE Only keep actually required symbols
|
|
43 | 52 | # TODO OPTIMIZE Only keep actually required symbols
|
44 | 53 | *;
|
45 | 54 | }
|
46 |
| - |
47 | 55 | -keep class io.realm.kotlin.internal.interop.sync.AppError {
|
48 | 56 | # TODO OPTIMIZE Only keep actually required symbols
|
49 | 57 | *;
|
|
99 | 107 | -keep class io.realm.kotlin.internal.interop.ProgressCallback {
|
100 | 108 | *;
|
101 | 109 | }
|
102 |
| - |
| 110 | +-keep class io.realm.kotlin.internal.interop.sync.ApiKeyWrapper { |
| 111 | + *; |
| 112 | +} |
103 | 113 | # Preserve Function<X> methods as they back various functional interfaces called from JNI
|
104 | 114 | -keep class kotlin.jvm.functions.Function* {
|
105 | 115 | *;
|
106 | 116 | }
|
107 |
| - |
108 | 117 | -keep class kotlin.Unit {
|
109 | 118 | *;
|
110 | 119 | }
|
|
0 commit comments