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
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Activo
- Área
- build-system, mobile, performance
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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?
- Lenguaje dominante
- Swift
- Estrellas
- 3.3k
- Forks
- 115
- Merge medio
- 1 d 15 h
- PR fusionados (30 d)
- 5
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de skiptools/skip
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Comments in functionsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
enhancement project
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
skiptools/skip#673 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 1/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
Todos los issues de skiptools/skip
Issues similares
-
enhancement help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
heysidhant/appvanish#4 ·
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
timfraedrich/OutRun#121 ·
-
deferred tooling
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
mauwii/pokerchipcase#157 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Verify the Intel (x86_64) buildAbiertogood first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100