mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-11-22 17:12:51 +00:00
Bundle all downloaded dependency files
Previously, only .jar files were bundled, with other files (modules, POMs, zips, etc) being left in Gradle User Home. All downloaded files are now included in the bundle. Fixes #100
This commit is contained in:
parent
063fc6a872
commit
4ebd000afd
3 changed files with 6 additions and 4 deletions
|
@ -36,7 +36,7 @@ jobs:
|
||||||
gradle-home-cache-artifact-bundles: |
|
gradle-home-cache-artifact-bundles: |
|
||||||
[
|
[
|
||||||
["generated-gradle-jars", "caches/*/generated-gradle-jars/*.jar"],
|
["generated-gradle-jars", "caches/*/generated-gradle-jars/*.jar"],
|
||||||
["dependency-jars", "caches/modules-*/files-*/**/*.jar"],
|
["dependencies", "caches/modules-*/files-*/*/*/*/*/"],
|
||||||
["instrumented-jars", "caches/jars-*/*/"],
|
["instrumented-jars", "caches/jars-*/*/"],
|
||||||
["kotlin-dsl", "caches/*/kotlin-dsl/*/*/"]
|
["kotlin-dsl", "caches/*/kotlin-dsl/*/*/"]
|
||||||
]
|
]
|
||||||
|
@ -67,7 +67,7 @@ jobs:
|
||||||
gradle-home-cache-artifact-bundles: |
|
gradle-home-cache-artifact-bundles: |
|
||||||
[
|
[
|
||||||
["generated-gradle-jars", "caches/*/generated-gradle-jars/*.jar"],
|
["generated-gradle-jars", "caches/*/generated-gradle-jars/*.jar"],
|
||||||
["dependency-jars", "caches/modules-*/files-*/**/*.jar"],
|
["dependencies", "caches/modules-*/files-*/*/*/*/*/"],
|
||||||
["instrumented-jars", "caches/jars-*/*/"],
|
["instrumented-jars", "caches/jars-*/*/"],
|
||||||
["kotlin-dsl", "caches/*/kotlin-dsl/*/*/"]
|
["kotlin-dsl", "caches/*/kotlin-dsl/*/*/"]
|
||||||
]
|
]
|
||||||
|
|
|
@ -62,7 +62,7 @@ inputs:
|
||||||
[
|
[
|
||||||
["generated-gradle-jars", "caches/*/generated-gradle-jars/*.jar"],
|
["generated-gradle-jars", "caches/*/generated-gradle-jars/*.jar"],
|
||||||
["wrapper-zips", "wrapper/dists/*/*/*.zip"],
|
["wrapper-zips", "wrapper/dists/*/*/*.zip"],
|
||||||
["dependency-jars", "caches/modules-*/files-*/**/*.jar"],
|
["dependencies", "caches/modules-*/files-*/*/*/*/*/"],
|
||||||
["instrumented-jars", "caches/jars-*/*/"],
|
["instrumented-jars", "caches/jars-*/*/"],
|
||||||
["kotlin-dsl", "caches/*/kotlin-dsl/*/*/"]
|
["kotlin-dsl", "caches/*/kotlin-dsl/*/*/"]
|
||||||
]
|
]
|
||||||
|
|
|
@ -5,6 +5,8 @@ import * as crypto from 'crypto'
|
||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
import * as fs from 'fs'
|
import * as fs from 'fs'
|
||||||
|
|
||||||
|
const CACHE_PROTOCOL_VERSION = 'v4-'
|
||||||
|
|
||||||
const CACHE_DISABLED_PARAMETER = 'cache-disabled'
|
const CACHE_DISABLED_PARAMETER = 'cache-disabled'
|
||||||
const CACHE_READONLY_PARAMETER = 'cache-read-only'
|
const CACHE_READONLY_PARAMETER = 'cache-read-only'
|
||||||
const JOB_CONTEXT_PARAMETER = 'workflow-job-context'
|
const JOB_CONTEXT_PARAMETER = 'workflow-job-context'
|
||||||
|
@ -25,7 +27,7 @@ export function isCacheDebuggingEnabled(): boolean {
|
||||||
|
|
||||||
export function getCacheKeyPrefix(): string {
|
export function getCacheKeyPrefix(): string {
|
||||||
// Prefix can be used to force change all cache keys (defaults to cache protocol version)
|
// Prefix can be used to force change all cache keys (defaults to cache protocol version)
|
||||||
return process.env[CACHE_PREFIX_VAR] || 'v3-'
|
return process.env[CACHE_PREFIX_VAR] || CACHE_PROTOCOL_VERSION
|
||||||
}
|
}
|
||||||
|
|
||||||
function generateCacheKey(cacheName: string): CacheKey {
|
function generateCacheKey(cacheName: string): CacheKey {
|
||||||
|
|
Loading…
Reference in a new issue