Update the proguard rules with precise keep rules and bundle them as consumer-rules.pro
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 4.4k
- Forks
- 627
- Avg merge
- 3d 15m
- Merged PRs (30d)
- 20
Description
The current documentation recommends broad keep rules
(-keep class com.yourcompany.yourgeneratedcode.** { *; }).
This prevents R8 from stripping unused generated protobuf models, leading to unnecessary app bloat.
Proposed Solution:
Replace the blanket documentation rules with granular ones that only preserve what Wire accesses reflectively (like ADAPTER, @WireField, and Enum Companions).
Ship these exact rules inside a consumer-rules.pro file within the Wire Android/Kotlin runtime artifact for a zero-config, optimized setup.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the current ProGuard guidance and the Android/Kotlin runtime artifact packaging. Review which reflective accesses require preservation, including ADAPTER, @WireField, and enum companions. Done means the documentation uses granular rules and the runtime artifact bundles them in consumer-rules.pro, with the relevant build verification passing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- build-system, documentation, mobile-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100