Skip to content

Add keep rule for keeping generic signature of return types - #3886

Merged
JakeWharton merged 2 commits into
lysine-dev:masterfrom
mkj-gram:master
May 5, 2023
Merged

Add keep rule for keeping generic signature of return types#3886
JakeWharton merged 2 commits into
lysine-dev:masterfrom
mkj-gram:master

Conversation

@mkj-gram

@mkj-gram mkj-gram commented May 2, 2023

Copy link
Copy Markdown
Contributor

The additional rule generalises keeping the generic signature of return type of service methods. The rule effectively fixes an issue with RxJava3 Observables as reported in b/280277628.

@JakeWharton

Copy link
Copy Markdown
Collaborator

I suspect this means we can delete https://github.com/square/retrofit/blob/master/retrofit-adapters/rxjava3/src/main/resources/META-INF/proguard/retrofit2-rxjava3-adapter.pro and the others whose goal was to mitigate this. I'll do that and merge tomorrow.

@JakeWharton

Copy link
Copy Markdown
Collaborator

Based on the linked bug, the rules which were already embedded in the adapters should have kept the signature.

Regardless, your rule is superior since it covers all potential return values instead of us having to remember to include it for every type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants