[BTAPP-57] Add Android native-code compile gate to app CI #85

Merged
chris merged 11 commits from feature/BTAPP-57 into main 2026-09-01 18:33:33 -06:00
Owner

Ticket

BTAPP-57 Compile the Android native code in CI

Summary

  • Adds an android job to .forgejo/workflows/app.yml, parallel to the existing check job, path-filtered the same way (app/**)
  • Regenerates the gitignored android/ project per-run via bunx expo prebuild --platform android --no-install (no npm dependency), installs JDK 17 via actions/setup-java@v4, and compiles the hand-written Kotlin in app/modules/notification-doorbell plus merges its manifest via ./gradlew :notification-doorbell:assembleDebug :app:processDebugMainManifest — the fast pair, not a full assembleDebug
  • Android SDK cmdline-tools are installed via plain shell (curl + unzip of a pinned commandlinetools-linux-11076708_latest.zip, then sdkmanager --licenses), not android-actions/setup-android@v3 as originally planned — that action isn't in this Forgejo instance's action mirror (data.forgejo.org) and 404s. See docs/CI.md for the corrected explanation of how this instance resolves third-party actions.
  • A stub google-services.json (package name only, no real credentials) stands in for the real gitignored file, avoiding a CI secret
  • ~/.gradle + ~/android-sdk are cached alongside the existing ~/.bun/install/cache entry
  • Documents the new job in docs/CI.md, including the corrected action-mirror note above
  • This is a compile gate, not a test gate — no Kotlin unit tests are added (out of scope per the ticket)

Verification

  • Red/green proof observed directly on this PR, via a temporary probe commit that introduced a deliberate Kotlin syntax error under app/modules/notification-doorbell/android/src/main/java/com/budgettracker/doorbell/Doorbell.kt, confirmed against the raw runner log (not just the surface-level pass/fail status) for both ends:
    • Red: with the syntax error in place, the android job failed with e: .../Doorbell.kt:283:40 Syntax error: Expecting '"'. / BUILD FAILED in 1m 2s — after successfully getting through checkout, bun install, JDK setup, SDK cmdline-tools install, and license acceptance, i.e. failing for the right reason and not some earlier toolchain gap.
    • Green: after reverting the probe, the android job passed cleanly — BUILD SUCCESSFUL in 2m 19s, 144 actionable tasks: 143 executed, 1 up-to-date, total job wall time ~2m48s (Gradle/SDK cache warm from the preceding run).
    • Along the way, pinning the newest cmdline-tools build (v23.0/16111833) turned out to regress sdkmanager --licenses into a silent no-op (replaced by a new android CLI), causing a LicenceNotAcceptedException unrelated to the probe — caught the same way (raw log, not just status) and fixed by pinning the long-stable build 11076708 (v11.0) instead.
    • Mid-verification, this Forgejo instance's pull_request-triggered Actions run creation stalled for several pushes on this PR (webhook/post-receive succeeded each time, but no run was ever created). Restarting the forgejo-runner container had no effect; restarting the main forgejo container also did not restore the pull_request trigger path (still not firing as of this PR), but it did NOT lose the underlying data or affect the runner's ability to execute jobs — dispatching the workflow manually (POST .../actions/workflows/app.yml/dispatches, workflow_dispatch event) against this PR's exact head commit worked immediately and is what produced the red/green proof above (tasks 337/339/341 = pull_request-triggered before the stall; 343/345 = workflow_dispatch after it). The pull_request/push trigger stall on this Forgejo instance is still open and unrelated to this ticket's code — worth its own follow-up investigation/ticket; branch protection and normal PR checks will not run until it's fixed.
## Ticket [BTAPP-57](http://192.168.2.100:7123/home/browse/BTAPP-57/) Compile the Android native code in CI ## Summary - Adds an `android` job to `.forgejo/workflows/app.yml`, parallel to the existing `check` job, path-filtered the same way (`app/**`) - Regenerates the gitignored `android/` project per-run via `bunx expo prebuild --platform android --no-install` (no npm dependency), installs JDK 17 via `actions/setup-java@v4`, and compiles the hand-written Kotlin in `app/modules/notification-doorbell` plus merges its manifest via `./gradlew :notification-doorbell:assembleDebug :app:processDebugMainManifest` — the fast pair, not a full `assembleDebug` - Android SDK cmdline-tools are installed via plain shell (`curl` + `unzip` of a pinned `commandlinetools-linux-11076708_latest.zip`, then `sdkmanager --licenses`), **not** `android-actions/setup-android@v3` as originally planned — that action isn't in this Forgejo instance's action mirror (`data.forgejo.org`) and 404s. See `docs/CI.md` for the corrected explanation of how this instance resolves third-party actions. - A stub `google-services.json` (package name only, no real credentials) stands in for the real gitignored file, avoiding a CI secret - `~/.gradle` + `~/android-sdk` are cached alongside the existing `~/.bun/install/cache` entry - Documents the new job in `docs/CI.md`, including the corrected action-mirror note above - This is a compile gate, not a test gate — no Kotlin unit tests are added (out of scope per the ticket) ## Verification - [x] **Red/green proof observed directly on this PR**, via a temporary probe commit that introduced a deliberate Kotlin syntax error under `app/modules/notification-doorbell/android/src/main/java/com/budgettracker/doorbell/Doorbell.kt`, confirmed against the raw runner log (not just the surface-level pass/fail status) for both ends: - **Red**: with the syntax error in place, the `android` job failed with `e: .../Doorbell.kt:283:40 Syntax error: Expecting '"'.` / `BUILD FAILED in 1m 2s` — after successfully getting through checkout, bun install, JDK setup, SDK cmdline-tools install, and license acceptance, i.e. failing for the right reason and not some earlier toolchain gap. - **Green**: after reverting the probe, the `android` job passed cleanly — `BUILD SUCCESSFUL in 2m 19s`, `144 actionable tasks: 143 executed, 1 up-to-date`, total job wall time **~2m48s** (Gradle/SDK cache warm from the preceding run). - Along the way, pinning the *newest* cmdline-tools build (v23.0/16111833) turned out to regress `sdkmanager --licenses` into a silent no-op (replaced by a new `android` CLI), causing a `LicenceNotAcceptedException` unrelated to the probe — caught the same way (raw log, not just status) and fixed by pinning the long-stable build 11076708 (v11.0) instead. - Mid-verification, this Forgejo instance's `pull_request`-triggered Actions run creation stalled for several pushes on this PR (webhook/post-receive succeeded each time, but no run was ever created). Restarting the `forgejo-runner` container had no effect; restarting the main `forgejo` container also did not restore the `pull_request` trigger path (still not firing as of this PR), but it did NOT lose the underlying data or affect the runner's ability to execute jobs — dispatching the workflow manually (`POST .../actions/workflows/app.yml/dispatches`, `workflow_dispatch` event) against this PR's exact head commit worked immediately and is what produced the red/green proof above (tasks 337/339/341 = pull_request-triggered before the stall; 343/345 = workflow_dispatch after it). **The `pull_request`/`push` trigger stall on this Forgejo instance is still open and unrelated to this ticket's code** — worth its own follow-up investigation/ticket; branch protection and normal PR checks will not run until it's fixed.
[BTAPP-57] Probe: introduce a deliberate Kotlin syntax error to verify the android CI job fails.
Some checks failed
app / check (pull_request) Successful in 20s
app / android (pull_request) Failing after 33s
1d3e8f4c7a
[BTAPP-57] Replace unavailable setup-android action with manual SDK cmdline-tools install.
Some checks failed
app / check (pull_request) Successful in 20s
app / android (pull_request) Failing after 1m24s
48a6476cbd
[BTAPP-57] Pin Android cmdline-tools to a stable build; latest regressed sdkmanager --licenses.
Some checks failed
app / check (pull_request) Successful in 20s
app / android (pull_request) Failing after 2m26s
40ab51df2d
[BTAPP-57] Empty commit to confirm the pull_request trigger is healthy again.
All checks were successful
plane-sync / sync (pull_request) Successful in 1s
86ae0fa28f
chris merged commit 7108b01023 into main 2026-09-01 18:33:33 -06:00
chris deleted branch feature/BTAPP-57 2026-09-01 18:33:33 -06: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
chris/budget-tracker!85
No description provided.