Files
app/.github/actions/set-version
T
denis0001-dev 0e7b1810fc Stop the Gradle build cache from being invalidated on every release
Two independent defects, both found while a release sat at 8.83 GB of the
10 GB per-repo cache limit with entries being evicted.

1. set-version rewrote build.gradle.kts with sed on every run, and that file
   is hashed into the Gradle build-cache key — so each release produced a
   brand-new key and orphaned the previous one. The repo inventory showed the
   damage: windows-package-x64, macos-x64 and windows-package-arm64 each had
   two ~1.1 GB entries differing only in that hash. build.gradle.kts now reads
   -PversionName/-PversionCode (injected as ORG_GRADLE_PROJECT_* by
   set-version) and keeps its previous values as defaults, so local builds are
   unchanged. Types stay String/Integer for the `as Int`/`as String` consumers
   in app/android and app/shared. Side benefit: hash-release-build-inputs also
   hashes build.gradle.kts, so the "inputs unchanged" marker no longer churns
   per version either.

2. Every desktop scope archived the Android build dirs (never built there)
   plus the final installers, the exported ProGuard jars, the jpackage runtime
   image and the ProGuard temp output — all regenerated for each version, and
   together the bulk of a ~1.7 GB entry. Those paths are now excluded, which
   is what kept the repo over the limit and into eviction (GitHub evicts by
   oldest last-accessed once the limit is hit).

Restore and save path lists stay in sync: actions/cache silently skips the save
when they differ.

Cross-tag reuse is NOT addressed here and cannot be: per the docs, a run for one
tag cannot read another tag's cache, and the automatic retry against the default
branch is a no-op for us because main has no app/desktop module to warm it.
0e7b1810fc · 2026-10-16 20:36:56 +03:00
History
..