From 6b6984e9dd683bff6cdb5931694e1b8efc3533ae Mon Sep 17 00:00:00 2001 From: Goooler Date: Fri, 11 Nov 2022 04:36:28 +0800 Subject: [PATCH] Add proguard rules to keep inherited services --- retrofit/src/main/resources/META-INF/proguard/retrofit2.pro | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/retrofit/src/main/resources/META-INF/proguard/retrofit2.pro b/retrofit/src/main/resources/META-INF/proguard/retrofit2.pro index ebee34aa57..9599746d30 100644 --- a/retrofit/src/main/resources/META-INF/proguard/retrofit2.pro +++ b/retrofit/src/main/resources/META-INF/proguard/retrofit2.pro @@ -31,6 +31,10 @@ -if interface * { @retrofit2.http.* ; } -keep,allowobfuscation interface <1> +# Keep inherited services. +-if interface * { @retrofit2.http.* ; } +-keep,allowobfuscation interface * extends <1> + # 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