Fix Gradle build directory cache for UP-TO-DATE incremental builds.

Cache project .gradle/ and root build/ (execution history + outputs), restore git mtimes after checkout, skip set-version when unchanged, and bump cache keys to v2 with build-jar restore fallback.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-14 14:41:47 +03:00
Unverified
parent 607192680a
commit 15f88c7349
5 changed files with 48 additions and 18 deletions
@@ -0,0 +1,12 @@
name: Restore git mtimes
description: Reset tracked file timestamps from git so Gradle incremental builds can be UP-TO-DATE after checkout
runs:
using: composite
steps:
- name: Restore mtimes
shell: bash
run: |
set -euo pipefail
python3 -m pip install --disable-pip-version-check --quiet git-restore-mtime
python3 -m git_restore_mtime