Skip to content

Document R8 / full-mode minification safety in README#9

Merged
projectdelta6 merged 1 commit into
masterfrom
develop
Jun 10, 2026
Merged

Document R8 / full-mode minification safety in README#9
projectdelta6 merged 1 commit into
masterfrom
develop

Conversation

@projectdelta6

Copy link
Copy Markdown
Owner

What

Adds an R8 / ProGuard / Minification section to the README documenting that PrefsHelper needs no consumer keep rules.

Why

While enabling R8 full-mode on a consuming app (AIM Capture), it built and ran with zero PrefsHelper keep rules. This documents why that's safe by design:

  • Preference keys are always explicit string arguments to the *Pref(...) delegates — never derived from Kotlin property names via reflection, so R8 renaming/merging/repackaging can't change a persisted key.
  • The only reflection is enumConstants; enum values are stored by Enum.name (preserved by R8's default Android rules).
  • No Gson/Moshi/kotlinx-serialization/Proto DataStore — nothing to keep.

Claims verified against the actual source before writing.

Release

Docs-only — no release needed.

🤖 Generated with Claude Code

Add an R8 / ProGuard / Minification section explaining that PrefsHelper
needs no consumer keep rules: preference keys are explicit string args,
never derived from property names via reflection, so renaming/merging is
safe. Enum values are stored by Enum.name, preserved by R8's default
Android rules.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@projectdelta6 projectdelta6 merged commit 4f8f4d5 into master Jun 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant