Update the proguard rules with precise keep rules and bundle them as consumer-rules.pro
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- kotlin
调研方向
首先定位当前的 ProGuard 指南以及 Android/Kotlin 运行时 artifact 的打包方式。检查哪些反射访问需要保留,包括 ADAPTER、@WireField 和 enum companion。完成标准是文档使用细粒度规则,运行时 artifact 将这些规则打包在 consumer-rules.pro 中,并且相关的构建验证通过。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Kotlin
- 星标
- 4.4k
- 派生
- 635
- 平均合并
- 7 小时 27 分钟
- 30 天内合并 PR
- 2
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
square/wire 的其他 Issue
-
Moshi and Gson JSON adapters fail for messages with a map<bool, V> field可能已有人在做 @sebxt 于 11 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
-
GrpcStreamingCall() factory's executeIn() hardcodes Dispatchers.IO instead of using an incoming scope可能已有人在做 @oldergod 于 198 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
-
Wire 7.1.0: Uncaught IllegalStateException on Incompatible Wire Types for Message Fields可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 48/100
-
Swift: clear a field's preserved unknown enum value from unknownFields when the field is mutated未关闭
难度 4/5 3-5 天 新手友好度 52/100
-
难度 3/5 1-2 天 新手友好度 76/100
相似的 Issue
-
pending:code-area pending:issue-category to-triage
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
T31n/YagniLauncher#1096 ·
维护者通常 1 天内回复
-
win_build: parallel PostBuildEvent race in example_app_atiopencl and example_app_nvopencl copying openclapp_kernels.cl可能已有人在做 @qixuancao 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复
-
OkHttp versions 5.4.0+ no longer include baseline-prof.txt可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭bug
难度 1/5 1 小时以内 新手友好度 83/100
lysine-dev/okhttp#9828 ·
维护者通常 1 天内回复
-
bug Impact: Low Work: Low
难度 2/5 1-3 小时 新手友好度 66/100
oppia/oppia-android#6532 · 1 条评论 ·
维护者通常 3 天内回复