Skip to content

Commit

Permalink
Add keep rule for keeping generic signature of return types (#3886)
Browse files Browse the repository at this point in the history
* Add keep rule for keeping generic signature of return types

* Remove now obsolete shrinker rules

---------

Co-authored-by: Jake Wharton <jw@squareup.com>
  • Loading branch information
mkj-gram and JakeWharton committed May 5, 2023
1 parent e015439 commit 59d302a
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 19 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

8 changes: 4 additions & 4 deletions retrofit/src/main/resources/META-INF/proguard/retrofit2.pro
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
-if interface * { @retrofit2.http.* <methods>; }
-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

# 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

# R8 full mode strips generic signatures from return types if not kept.
-if interface * { @retrofit2.http.* public *** *(...); }
-keep,allowoptimization,allowshrinking,allowobfuscation class <3>

0 comments on commit 59d302a

Please sign in to comment.