Skip to content
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

Document use of pbandk generated code with proguard #160

Open
garyp opened this issue Jun 5, 2021 · 0 comments
Open

Document use of pbandk generated code with proguard #160

garyp opened this issue Jun 5, 2021 · 0 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers platform-android platform-jvm
Milestone

Comments

@garyp
Copy link
Collaborator

garyp commented Jun 5, 2021

To keep all generated classes, you should be able to use:

-keep class * extends pbandk.Message { *; }
-keep class * extends pbandk.Message$Companion { *; }

If you want proguard to strip out unused generated classes but keep the names, you can use something like this:

-keepnames class * extends pbandk.Message
-keepnames class * extends pbandk.Message$Companion
-keepclassmembers class * extends pbandk.Message {
    public static ** Companion;
}

Originally posted by @garyp in #141 (comment)

@garyp garyp added documentation Improvements or additions to documentation good first issue Good for newcomers labels Jun 5, 2021
@garyp garyp added this to the 0.11.0 milestone Jun 5, 2021
@garyp garyp modified the milestones: 0.11.0, 0.12.0 Sep 24, 2021
@garyp garyp modified the milestones: 0.12.0, 1.0 Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers platform-android platform-jvm
Projects
None yet
Development

No branches or pull requests

1 participant