Files
app/.github/actions/cache-gradle-build/action.yml
T
denis0001-dev 15f88c7349 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>
2026-09-14 14:41:47 +03:00

36 lines
1.4 KiB
YAML

name: Restore Gradle build directories
description: Restore project .gradle/, build/ trees for faster CI Gradle jobs
inputs:
scope:
description: Unique id for this job (part of the cache key; use restore-keys to reuse other scopes)
required: true
outputs:
cache-hit:
description: Whether an exact cache key match was restored
value: ${{ steps.cache.outputs.cache-hit }}
cache-primary-key:
description: Primary cache key to pass to the save action after the build
value: ${{ steps.cache.outputs.cache-primary-key }}
runs:
using: composite
steps:
- uses: actions/cache/restore@v5
id: cache
with:
path: |
.gradle
build
app/desktop/build
app/shared/build
app/android/build
utils/shared/build
utils/android/build
key: gradle-build-${{ runner.os }}-${{ runner.arch }}-v2-${{ inputs.scope }}-${{ hashFiles('gradle/libs.versions.toml', 'settings.gradle.kts', 'gradle.properties', 'build.gradle.kts', 'app/desktop/build.gradle.kts', 'app/desktop/proguard-rules.pro', 'app/shared/build.gradle.kts', 'app/android/build.gradle.kts', 'utils/shared/build.gradle.kts', 'utils/android/build.gradle.kts') }}
restore-keys: |
gradle-build-${{ runner.os }}-${{ runner.arch }}-v2-${{ inputs.scope }}-
gradle-build-${{ runner.os }}-${{ runner.arch }}-v2-build-jar-
gradle-build-${{ runner.os }}-${{ runner.arch }}-v2-