Skip to content

Interface without any methods not handled by Retrofit consumer keep rules #4295

Description

@sgjesse

A question from the R8 team. We recently handled https://issuetracker.google.com/391260908, which turned out to be an interface passed to create in Retrofit, which needed to be kept. The consumer keep rules already have rules to keep Retrofit interfaces, https://github.com/square/retrofit/blob/trunk/retrofit/src/main/resources/META-INF/proguard/retrofit2.pro#L31, says

-if interface * { @retrofit2.http.* <methods>; }
-keep,allowobfuscation interface <1>

However, in the case of the issue the interface had no methods (and then trivially no methods annotated with a retrofit2.http.* annotation).

Is an interface without any methods a relevant use case for Retrofit create?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions