Skip to content

Commit

Permalink
Add proguard rules for Retrofit + suspend functions
Browse files Browse the repository at this point in the history
  • Loading branch information
StylianosGakis committed Apr 25, 2023
1 parent 40fa89e commit ed5e294
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@
-dontwarn org.conscrypt.**
-dontwarn org.bouncycastle.**
-dontwarn org.openjsse.**

# 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
# endregion

# region okio - https://square.github.io/okio/#r8-proguard
Expand Down

0 comments on commit ed5e294

Please sign in to comment.