Skip to content

Commit c636401

Browse files
committed
add proguard rules to fix issue in retrofit
1 parent 48ffde9 commit c636401

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

proguard-rules.pro

+14
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,21 @@
6464
-dontwarn retrofit2.KotlinExtensions
6565
-dontwarn retrofit2.KotlinExtensions$*
6666

67+
6768
# With R8 full mode, it sees no subtypes of Retrofit interfaces since they are created with a Proxy
6869
# and replaces all potential values with null. Explicitly keeping the interfaces prevents this.
6970
-if interface * { @retrofit2.http.* <methods>; }
7071
-keep,allowobfuscation interface <1>
72+
73+
# Keep inherited services.
74+
-if interface * { @retrofit2.http.* <methods>; }
75+
-keep,allowobfuscation interface * extends <1>
76+
77+
# With R8 full mode generic signatures are stripped for classes that are not
78+
# kept. Suspend functions are wrapped in continuations where the type argument
79+
# is used.
80+
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
81+
82+
# R8 full mode strips generic signatures from return types if not kept.
83+
-if interface * { @retrofit2.http.* public *** *(...); }
84+
-keep,allowoptimization,allowshrinking,allowobfuscation class <3>

0 commit comments

Comments
 (0)