New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service interface extending doesn't work with Proguard/R8 #3539
Labels
Comments
Although I'd naively expect this to already be that general rule |
:/ |
As a workaround we could annotate the base class too:
|
I need a project which reproduces the behavior in order to investigate. |
@JakeWharton created a reproducible sample here: https://github.com/dmytroKarataiev/RetrofitProguard/tree/master |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, since latest versions now support service interface subclassing, as to facilitate versioning, I did just so
I'm on android. If run in debug, everything works.
If run with R8 turned on, at runtime I get
If I explicitly keep the class
-keep class foo.bar.V2ConfigApi { *; }
it worksIt appears R8 ignores the "implementing" interface V2ConfigApi (Its only reference is in a dagger module provider method, and nowhere else), and just uses the base one, which obviously doesn't have the annotations.
I can live with the keep rule for now, but it's footgunny, since almost nothing requires app level keep rules now
Is there a general rule to be extracted? (and then possibly merged into the library)
Android
AGP 4.1.2
Retrofit 2.9.0
The text was updated successfully, but these errors were encountered: