Skip to content

Commit 3262149

Browse files
ADFA-3604: Re-enable R8 shrinking with keep rules for kotlin-analysis-api (#1596)
* ADFA-3604: Re-enable R8 shrinking with keep rules for kotlin-analysis-api Removes the blanket -dontshrink added in ADFA-996, which neutered R8 shrinking entirely after it broke release-build project init. Adds targeted keep rules for every class the bundled kotlin-analysis-api jar loads reflectively via IntelliJ plugin XML descriptors and ServiceLoader entries, since those are the paths R8 can't trace from bytecode reachability alone. Cuts release dex from 119.4 MB / 104,033 classes to 28.8 MB / 24,853 classes in a trial build. Not yet verified on a physical device. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * ADFA-3604: Document keep-rule generation and regeneration procedure Review feedback on #1596: the 352-entry keep-rule list had no documented provenance. Adds the exact extraction/parsing steps used to generate it and how to regenerate and diff it after a Kotlin Analysis API or IntelliJ platform dependency bump. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
1 parent b865016 commit 3262149

2 files changed

Lines changed: 393 additions & 3 deletions

File tree

‎app/proguard-rules.pro‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,6 @@
133133
-keep class io.sentry.** { *; }
134134
-dontwarn io.sentry.**
135135

136-
## Prevent R8 from moving what it thinks as unused classes
137-
-dontshrink
138-
139136
## Plugin SPI
140137
## Plugins are loaded dynamically via DexClassLoader, so R8 cannot see their
141138
## implementations of these interfaces. Without these rules, R8 narrows the

0 commit comments

Comments
 (0)