blob: da7bcbaed17b69b1f4ded21232420082312e18e2 [file] [log] [blame]
# Copyright (c) 2020, the R8 project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
# Gson uses generic type information stored in a class file when working with fields.
# R8 removes such information by default, so configure it to keep all of it.
-keepattributes Signature
-keepattributes EnclosingMethod
-keepattributes InnerClasses
# For using GSON @Expose annotation
-keepattributes AnnotationDefault,RuntimeVisibleAnnotations
# Gson specific classes
-dontwarn sun.misc.Unsafe
# Application classes that will be serialized/deserialized over Gson
-keep class$Data { <fields>; }
-keep class$NullableConcurrentHashMap
-keep class$NullableHashMap
-keep class$NullableMap
-keep class$NullableConcurrentMap
-keep class$Data { <fields>; }
# Prevent R8 from stripping interface information from TypeAdapter, TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class * extends
-keep class * implements
-keep class * implements
-keep class * implements
# Prevent R8 from leaving Data object members always null
-keepclassmembers,allowobfuscation class * { <fields>;