Skip to content

feat(android): shrink and optimize release builds with R8 - #623

Draft
mchisolm0 wants to merge 3 commits into
mainfrom
t3/play-dex-obfuscation-alert
Draft

mchisolm0 wants to merge 3 commits into
mainfrom
t3/play-dex-obfuscation-alert

Conversation

@mchisolm0

@mchisolm0 mchisolm0 commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Play Console flags 0.2.0 (43) for DEX optimization below 25% (obfuscation 2%, optimization not measured), with a Feb 2027 deadline. Release builds never ran R8.

  • expo-build-properties: enableMinifyInReleaseBuilds and enableShrinkResourcesInReleaseBuilds.
  • @sentry/react-native: experimental_android.enableAndroidGradlePlugin, so each build uploads its R8 mapping and Java stack traces stay readable. SENTRY_AUTH_TOKEN is already set in every EAS environment.
  • app.config.ts: Gradle heap to 4 GB. R8 ran out of memory at the template's 2 GB.
  • eas.json: development and preview Android builds compile arm64-v8a,x86_64 only, for faster builds. Production keeps all four ABIs. This replaces the same EAS env vars set on development and preview; delete those after the build ships.

This moves the native fingerprint. Hold until the next native build (#207) so current installs keep getting OTA updates.

:app:minifyReleaseWithR8 passes locally with no missing classes. Before merging: smoke a release build on a device. R8 can strip classes that native modules look up by name; the local modules in modules/ have no keep rules.

Made with Claude Opus 5.5 in Claude Code (T3 Code).

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Play flags DEX optimization below 25% for 0.2.0 (43). Turn on R8 and
resource shrinking, and the Sentry Android Gradle plugin so the R8
mapping uploads and Java stack traces stay readable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Deploying scryve with  Cloudflare Pages  Cloudflare Pages

Latest commit: 79ad2f7
Status: ✅  Deploy successful!
Preview URL: https://6debaedc.count-cct.pages.dev
Branch Preview URL: https://t3-play-dex-obfuscation-aler.count-cct.pages.dev

View logs

@mchisolm0 mchisolm0 mentioned this pull request Oct 22, 2026
16 of 22 tasks
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository YAML (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Team
  • Run ID: a7ba611e-cd0e-4abe-8d6b-8e8b828f4f58

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Native builds are needed for these targets:

Environment Platform Fingerprint difference
Development iOS e9f7296d → 90ea5ff7
Development Android 901d470c → 04dc6bcb
Preview iOS b94b70ad → 9fba14e6
Preview Android bf734454 → 0b2c85a3
Production iOS 337e20e1 → 29fbb7d1
Production Android a32cd4cb → c1019115

Changed fingerprint inputs:

  • eas.json
  • expoConfig

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Bundle Size Change
iOS 13.48 MB +3 KB (+0.0%)
Android 13.67 MB +16 KB (+0.1%)
Web 7.61 MB -2 KB (-0.0%)

Compared with the latest main build. A bundle that grows more than 1% fails.

mchisolm0 and others added 2 commits October 21, 2026 23:58
R8 ran out of memory at the template's 2 GB during a local release build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Production keeps all four ABIs. Moves the EAS env var set on 2026-10-22
into the repo; this file is part of the fingerprint, so it rides the
next native build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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