Files
KaraZajacandClaude Opus 5 adbf2526fd build: constrain androidx.fragment to 1.9.0 so release builds pass lint
`./gradlew :app:assembleRelease` has been failing at lintVitalRelease with
InvalidFragmentVersionForActivityResult. CI only builds :app:assembleDebug, so
it never surfaced there; the failure predates the Waze work (reproduced on a
clean checkout of v0.5.14).

Cause: play-services-location drags in androidx.fragment 1.1.0 via
play-services-base and play-services-basement. That version's FragmentActivity
predates the ActivityResult APIs — it failed to call
super.onRequestPermissionsResult() and used invalid request codes — and lint
fails the build because MainActivity registers the permission prompt with
registerForActivityResult.

Nothing in this app uses Fragments (MainActivity is a ComponentActivity and the
UI is all Compose), so this is a dependency constraint rather than a new
dependency: it raises a version already on the classpath instead of adding an
edge.

Verified:
- :app:assembleDebug and :app:assembleRelease both succeed, lintVitalRelease
  included.
- Resolution reports fragment 1.1.0 -> 1.9.0 "by constraint".
- Every androidx.fragment type play-services actually references — Fragment,
  FragmentActivity, FragmentManager, FragmentTransaction, DialogFragment —
  still exists in 1.9.0.
- The built APK carries the modern implementation (FragmentStateManager,
  SpecialEffectsController, FragmentStrictMode), not a mixed set.
- Debug APK grows 19.57 -> 19.71 MB.

Not verified on a device: the emulator segfaults on this host at the moment,
unrelated to the app. The change is build configuration only and the app never
calls into Fragment, but a runtime smoke test is still worth doing before this
rides out in a release.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RsfSpnwuxCkcXKkD9XH8SR
2026-09-22 01:02:46 -04:00
..