Unverified Commit c157d0a3 authored by Daz DeBoer's avatar Daz DeBoer
Browse files

Cache downloaded Java Toolchains

Due to limitations with the way extracted entries are defined, a separate entry
is defined for *nix and windows.

Fixes #33
parent c61f5d87
Loading
Loading
Loading
Loading
+5 −3
Changes for action.yml: 5 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -62,9 +62,11 @@ inputs:
        [
          ["generated-gradle-jars", "caches/*/generated-gradle-jars/*.jar"],
          ["wrapper-zips", "wrapper/dists/*/*/*.zip"],
          ["dependencies", "caches/modules-*/files-*/*/*/*/*/"],
          ["instrumented-jars", "caches/jars-*/*/"],
          ["kotlin-dsl", "caches/*/kotlin-dsl/*/*/"]
          ["java-toolchains-win", "jdks/*.zip"],
          ["java-toolchains-nix", "jdks/*.tar.gz"],
          ["dependencies", "caches/modules-*/files-*/*/*/*/*"],
          ["instrumented-jars", "caches/jars-*/*"],
          ["kotlin-dsl", "caches/*/kotlin-dsl/*/*"]
        ]

outputs:
+2 −1
Changes for src/cache-gradle-user-home.ts: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -229,7 +229,8 @@ export class GradleUserHomeCache extends AbstractCache {
    }

    private isBundlePattern(pattern: string): boolean {
        return pattern.endsWith('*')
        // If pattern ends with `/*`, then we cache as a "bundle": all of the matching files in a single cache entry
        return pattern.endsWith(`${path.sep}*`)
    }

    private async collectCacheResults(processes: Promise<ExtractedCacheEntry>[]): Promise<ExtractedCacheEntry[]> {