fix(ci): stop gradle daemon between flutter build apk and assembleAndroidTest #554

Merged
guettlibot merged 1 commits from refs/pull/554/head into main 2026-06-10 11:13:33 +00:00
1 Commits
Author SHA1 Message Date
Till Düßmann (Claude agent)andClaude Opus 4.7 7239036c8e fix(ci): stop gradle daemon between flutter build apk and assembleAndroidTest
`flutter build apk --debug --no-pub` spawns a Gradle daemon whose journal
cache lock file lives on the persistent Dagger `gradle-cache` mount. When
the WithExec finishes, Dagger tears the container down and force-kills the
daemon, but the lock file remains with its now-dead PID. The next exec —
`./gradlew --no-daemon app:assembleAndroidTest` — then times out after 60s
waiting for that stale lock, failing the Firebase Test Lab build with:

  > Timeout waiting to lock journal cache (/home/ci/.gradle/caches/journal-1).
    It is currently in use by another process.
    Owner PID: 88
    Our PID: 53

The existing `--no-daemon` on the second exec only prevented daemon-registry
reuse, not stale lock files. Chain `./gradlew --stop` into the first exec so
the daemon shuts down gracefully and releases its locks before Dagger
snapshots the layer.

Closes #549

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-10 10:07:02 +00:00