fix(ci): add the R8 rules the release build has always referenced #12

Merged
brian merged 1 commit from test into main 2026-08-07 19:20:03 +00:00
Owner

proguard-rules.pro has been named in build.gradle.kts since the project was
scaffolded and never existed — the first release build was also the first
thing to read it. R8 failed on Tink's compile-time annotations, which come in
through androidx.security.crypto and are not on the runtime classpath.

The -dontwarn for those is the fix for the reported failure. The rest of the
file is for the failures that would have come next, and would have arrived at
runtime rather than at build time:

  • kotlinx.serialization's generated serializers are reached through a
    companion, so R8 has no path to them from the call sites and strips them.
    It surfaces on the first sync, looking like a corrupt page.
  • Retrofit implements the API interface with a runtime proxy built from its
    generic signatures; strip those and every call returns the wrong type.
  • The page content model's field names are the wire format, shared verbatim
    with the web client, so obfuscating them changes what gets written into
    pages.content.

Verified rather than assumed: the minified APK still contains 29 generated
serializers and the model classes by name. It builds at 5.5 MB.

Still untested: nothing has run a release build. The rules are the standard
ones and the evidence above says they took, but the first install is worth
doing by hand — sign in and sync once — before trusting an auto-update.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com

proguard-rules.pro has been named in build.gradle.kts since the project was scaffolded and never existed — the first release build was also the first thing to read it. R8 failed on Tink's compile-time annotations, which come in through androidx.security.crypto and are not on the runtime classpath. The -dontwarn for those is the fix for the reported failure. The rest of the file is for the failures that would have come next, and would have arrived at runtime rather than at build time: - kotlinx.serialization's generated serializers are reached through a companion, so R8 has no path to them from the call sites and strips them. It surfaces on the first sync, looking like a corrupt page. - Retrofit implements the API interface with a runtime proxy built from its generic signatures; strip those and every call returns the wrong type. - The page content model's field names *are* the wire format, shared verbatim with the web client, so obfuscating them changes what gets written into pages.content. Verified rather than assumed: the minified APK still contains 29 generated serializers and the model classes by name. It builds at 5.5 MB. Still untested: nothing has *run* a release build. The rules are the standard ones and the evidence above says they took, but the first install is worth doing by hand — sign in and sync once — before trusting an auto-update. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
proguard-rules.pro has been named in build.gradle.kts since the project was
scaffolded and never existed — the first release build was also the first
thing to read it. R8 failed on Tink's compile-time annotations, which come in
through androidx.security.crypto and are not on the runtime classpath.

The -dontwarn for those is the fix for the reported failure. The rest of the
file is for the failures that would have come next, and would have arrived at
runtime rather than at build time:

- kotlinx.serialization's generated serializers are reached through a
  companion, so R8 has no path to them from the call sites and strips them.
  It surfaces on the first sync, looking like a corrupt page.
- Retrofit implements the API interface with a runtime proxy built from its
  generic signatures; strip those and every call returns the wrong type.
- The page content model's field names *are* the wire format, shared verbatim
  with the web client, so obfuscating them changes what gets written into
  pages.content.

Verified rather than assumed: the minified APK still contains 29 generated
serializers and the model classes by name. It builds at 5.5 MB.

Still untested: nothing has *run* a release build. The rules are the standard
ones and the evidence above says they took, but the first install is worth
doing by hand — sign in and sync once — before trusting an auto-update.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
brian merged commit 6889e1b92c into main 2026-08-07 19:20:03 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
brian/Journal!12
No description provided.