fix: prevent Gradle daemon hang in Android test build (#155) #178

Merged
guettlibot merged 5 commits from issue-155-fix into main 2026-05-23 13:45:09 +00:00
guettlibot commented 2026-05-23 13:41:42 +00:00 (Migrated from codeberg.org)

Summary

Fixes #155 — the test-android-firebase CI job hangs indefinitely at the ./gradlew app:assembleAndroidTest step.

Root cause: Dagger preserves filesystem snapshots between WithExec steps but does not preserve background processes. After flutter build apk --debug completes, the Gradle daemon is killed (process cleanup), but its registry file remains on disk at /home/ci/.gradle/daemon/. The next WithExec for ./gradlew app:assembleAndroidTest finds the stale registry entry and hangs waiting to connect to a daemon that no longer exists.

Changes:

  • Add --no-daemon to ./gradlew app:assembleAndroidTest — this makes Gradle run in-process and skip the daemon registry entirely, eliminating the hang
  • Mount gradle-cache volume on the BuildAndroidDebugApks container (same as Base()) — avoids re-downloading all Gradle dependencies from scratch on every run
## Summary Fixes #155 — the `test-android-firebase` CI job hangs indefinitely at the `./gradlew app:assembleAndroidTest` step. **Root cause:** Dagger preserves filesystem snapshots between `WithExec` steps but does not preserve background processes. After `flutter build apk --debug` completes, the Gradle daemon is killed (process cleanup), but its registry file remains on disk at `/home/ci/.gradle/daemon/`. The next `WithExec` for `./gradlew app:assembleAndroidTest` finds the stale registry entry and hangs waiting to connect to a daemon that no longer exists. **Changes:** - Add `--no-daemon` to `./gradlew app:assembleAndroidTest` — this makes Gradle run in-process and skip the daemon registry entirely, eliminating the hang - Mount `gradle-cache` volume on the `BuildAndroidDebugApks` container (same as `Base()`) — avoids re-downloading all Gradle dependencies from scratch on every run
Sign in to join this conversation.