Skip Lite: Auto-generated -keep class <app.package>.** { *; } in the transpiled module's proguard-rules.pro blocks R8 shrinking/obfuscation/optimization for the entire app, triggering Google Play's "DEX code optimization is below our threshold" warning
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Active
- Domain
- build-system, mobile, performance
Research direction
Start by locating the generation of the per-module proguard-rules.pro and compare its behavior for transpiled-mode and Skip Fuse projects. Investigate whether skip.bridge.** and ModuleBundleAccessor require the blanket rule, and check the available skip.yml or build settings. Done means the generated rules can be narrowed or customized without breaking required runtime behavior.
Written by the indexing model from the issue text.
Description
Summary
Google Play Console now flags apps whose R8 optimization/obfuscation/shrinking percentages fall under 25%, with an enforcement deadline:
DEX code optimization is below our threshold
Improve your percentages in the following categories:
- Obfuscation (24%)
- Shrinking (24%)
Percentages under 25% in any category of your app may impact your visibility and publishing capabilities on Google Play. To prevent this, optimize your app by the deadline.
Release name: 245 (2.35.1)
Fix by: Feb 2027
Investigating why our percentages were so low, we found that the Skip Gradle plugin auto-generates a proguard-rules.pro for the app's own transpiled module (<TargetName>) that includes a blanket:
-keep class <app.package>.** { *; }
This covers essentially our entire transpiled app code (100% of our own classes).
We inspected our transpiled Kotlin app code to understand why this keep might be required:
Codable/Decodableconformance is transpiled into explicit, compiler-generatedencode(to:)/init(from:)methods with aCodingKeysenum holding hardcoded JSON key strings (e.g.container.encode(householdId, forKey = CodingKeys.householdId), whereCodingKeys.householdId.rawValue == "household_id"). This is not name-based reflection — the Kotlin property name and the JSON key are decoupled, so renaming/obfuscating properties doesn't break (de)serialization.- We found zero uses of
Class.forName,getDeclaredField,::class.simpleName, or other string-based reflection over our own app classes anywhere in the transpiled output.
So for at least the common case (plain Codable model structs, view models, business logic), a full -keep ... { *; } over the entire app package looks like defensive boilerplate rather than a real requirement — but since we don't know the full set of reasons Skip's runtime might reflect over the app's own module (e.g. skip.bridge.** interfaces, _ModuleBundleAccessor_, JNA-based interop), we didn't want to blindly rip it out without guidance from the maintainers.
We raised this in the Slack and got the response that this is a "moot point" since "most of the code is native." We believe that reasoning applies to Skip Fuse projects (native Swift binary + thin JNI bridge, where the JVM-side classes genuinely are minimal and DEX metrics matter less) rather than to transpiled projects like ours, where the entire app is ordinary Kotlin/DEX bytecode and fully subject to (and currently fully exempted from) R8's passes. We wanted to raise this explicitly in case the generated ruleset doesn't currently distinguish between the two build modes.
Impact
Because this rule is regenerated by the toolchain itself (not something we authored), every transpiled-mode Skip Android app is presumably hitting the same Play Console warning, with the same Feb 2027 enforcement deadline for "visibility and publishing capabilities."
Ask
- Could the generated per-module
proguard-rules.proscope its-keepmore narrowly than<app.package>.** { *; }for transpiled-mode projects — e.g.-keep,allowobfuscation,allowoptimization,allowshrinkingfor classes that don't need name preservation, or an explicit allowlist for the specific bridging mechanisms that actually require it (skip.bridge.**implementers,_ModuleBundleAccessor_, etc.)? - Alternatively, is there a supported
skip.yml/build setting to opt out of or customize this generated keep rule per-project, so transpiled apps that don't rely on reflection over their own generated code can shrink/obfuscate/optimize normally? - If this rule is required for correctness in the general case, could you point to what specifically depends on it, so we can evaluate whether it's safe to narrow for our project's ruleset instead?
- Dominant language
- Swift
- Stars
- 3.3k
- Forks
- 115
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 5
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from skiptools/skip
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
enhancement project
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
skiptools/skip#673 · 1 reaction ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 65/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
🎉 Add MPP ViewerOpen
Difficulty 1/5 Under an hour Newbie friendliness 88/100
jaywcjlove/awesome-mac#4728 ·
Maintainers usually reply within 1 day
-
compiler diagnostics quality ownership SIL ownership
Difficulty 1/5 Under an hour Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
T-Defect
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
element-hq/element-x-ios#6536 ·
Maintainers usually reply within 1 day
-
fxios-coreexperience
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mozilla-mobile/firefox-ios#36661 ·
Maintainers usually reply within 1 day