From 4c727718b8098766403ff76553a4ab2a8eff2166 Mon Sep 17 00:00:00 2001 From: Sad Ellie Date: Tue, 23 May 2023 09:57:00 +0300 Subject: [PATCH] Fix proguard rules for retrofit --- data/units/consumer-rules.pro | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/data/units/consumer-rules.pro b/data/units/consumer-rules.pro index 2acdb785..d9087e3d 100644 --- a/data/units/consumer-rules.pro +++ b/data/units/consumer-rules.pro @@ -1,5 +1,15 @@ -repackageclasses +# https://github.com/square/retrofit/issues/3751#issuecomment-1192043644 +# Keep generic signature of Call, Response (R8 full mode strips signatures from non-kept items). + -keep,allowobfuscation,allowshrinking interface retrofit2.Call + -keep,allowobfuscation,allowshrinking class retrofit2.Response + + # With R8 full mode generic signatures are stripped for classes that are not + # kept. Suspend functions are wrapped in continuations where the type argument + # is used. + -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation + -keepclassmembers class ** { @com.squareup.moshi.FromJson *; @com.squareup.moshi.ToJson *;