|
1 | 1 | -keep public class io.ably.lib.transport.WebSocketTransport$Factory {*;} |
2 | 2 | -keep class io.ably.lib.types.** {*;} |
3 | | --keep class io.ably.lib.objects.*LiveObjectsPlugin {*;} |
4 | | --keep class io.ably.lib.objects.serialization.*Serializer {*;} |
5 | | --keep class io.ably.lib.objects.ObjectsJsonSerializer {*;} |
| 3 | + |
| 4 | +# LiveObjects implementations are resolved at runtime via Class.forName(...) + |
| 5 | +# getDeclaredConstructor(...).newInstance(...) against hard-coded class-name strings |
| 6 | +# (see LiveObjectsPlugin.Factory, ObjectSerializer.Holder, LiveCounter#create and |
| 7 | +# LiveMap#create). R8 must not rename or strip these classes or their reflectively |
| 8 | +# invoked constructors. |
| 9 | +-keep class io.ably.lib.liveobjects.DefaultLiveObjectsPlugin { <init>(...); } |
| 10 | +-keep class io.ably.lib.liveobjects.serialization.DefaultObjectsSerializer { <init>(...); } |
| 11 | +-keep class io.ably.lib.liveobjects.value.livecounter.DefaultLiveCounter { <init>(...); } |
| 12 | +-keep class io.ably.lib.liveobjects.value.livemap.DefaultLiveMap { <init>(...); } |
| 13 | + |
| 14 | +# ObjectJsonSerializer and WireObjectDataJsonSerializer are instantiated reflectively |
| 15 | +# by Gson via @JsonAdapter annotations (on ProtocolMessage and WireObjectData |
| 16 | +# respectively); keep their no-arg constructors. |
| 17 | +-keep class io.ably.lib.liveobjects.serialization.ObjectJsonSerializer { <init>(...); } |
| 18 | +-keep class io.ably.lib.liveobjects.serialization.WireObjectDataJsonSerializer { <init>(...); } |
| 19 | + |
| 20 | +# The Wire* object model is (de)serialized to/from JSON by Gson via field-name |
| 21 | +# reflection (DefaultObjectsSerializer -> JsonSerialization.gson.fromJson/toJsonTree). |
| 22 | +# R8 must not rename or strip these fields or JSON transport silently breaks. Mirrors |
| 23 | +# the io.ably.lib.types.** rule above. (The MessagePack path uses explicit string keys |
| 24 | +# and is unaffected.) |
| 25 | +-keep class io.ably.lib.liveobjects.message.** { *; } |
6 | 26 |
|
7 | 27 | -keep class org.msgpack.core.** {*;} |
8 | 28 | -keepclasseswithmembers class io.ably.lib.rest.Auth** {*;} |
|
0 commit comments