WIP: android (optional): stable Gradle configuration/R8 cache keys across build numbers #153

Draft
founder wants to merge 1 commit from claude/w6-android-02-optional into main
Owner

Optional follow-up to #149 (held for founder OK — touches app runtime code + a deprecated AGP flag): channel/version via PackageManager instead of BuildConfig so compileReleaseKotlin / minifyReleaseWithR8 hit the Gradle cache across build numbers (verified FROM-CACHE across build numbers and worktrees; ~30 s per warm run). AGP 9.0 removes the legacy shrinker flag, so this has a shelf life.

🤖 Generated with Claude Code

Optional follow-up to #149 (held for founder OK — touches app runtime code + a deprecated AGP flag): channel/version via PackageManager instead of BuildConfig so `compileReleaseKotlin` / `minifyReleaseWithR8` hit the Gradle cache across build numbers (verified FROM-CACHE across build numbers and worktrees; ~30 s per warm run). AGP 9.0 removes the legacy shrinker flag, so this has a shelf life. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Follow-up to the Android cold-path change: compileReleaseKotlin and
minifyReleaseWithR8 miss the Gradle build cache on every new build number
because BUILD_NUMBER/channel flow into BuildConfig; read channel/version at
runtime via PackageManager (new AndroidBuildInfo.kt, 3 call sites) and set
the legacy shrinker flag so R8 output is stable. Measured: both tasks
FROM-CACHE across build numbers and worktrees (~30 s per warm run).

FOUNDER DECISION NEEDED: touches app runtime code (BuildConfig -> runtime
lookup) and flips a deprecated AGP flag (android.r8.integratedResourceShrinking=false,
removed in AGP 9.0).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin claude/w6-android-02-optional:claude/w6-android-02-optional
git switch claude/w6-android-02-optional
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
key-store/key.store!153
No description provided.