Skip to content

Commit

Permalink
Tweak Kotlin keep rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler committed Mar 1, 2024
1 parent b002131 commit 6e9b4b6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions retrofit/src/main/resources/META-INF/proguard/retrofit2.pro
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@
-if interface * { @retrofit2.http.* <methods>; }
-keep,allowobfuscation interface * extends <1>

# 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.
# 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
# We support Reulst as the return type, need to keep it in R8 full mode.
-keep,allowobfuscation,allowshrinking class kotlin.Result

# R8 full mode strips generic signatures from return types if not kept.
-if interface * { @retrofit2.http.* public *** *(...); }
Expand Down

0 comments on commit 6e9b4b6

Please sign in to comment.