mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-11-26 02:52:09 +00:00
Save/restore exploded Gradle dist rather than zip
To save space, future versions of Gradle are likely to delete the downloaded distribution after extracting it. See gradle/gradle#3605 and gradle/gradle#19495. To cater for this we will now save/restore the extracted distribution rather than the downloaded zip file.
This commit is contained in:
parent
bd717aced6
commit
0e24fa1975
5 changed files with 13 additions and 7 deletions
2
dist/main/index.js
vendored
2
dist/main/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/main/index.js.map
vendored
2
dist/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/post/index.js
vendored
2
dist/post/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/post/index.js.map
vendored
2
dist/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
@ -304,13 +304,19 @@ export class GradleHomeEntryExtractor extends AbstractEntryExtractor {
|
||||||
patterns: string[],
|
patterns: string[],
|
||||||
bundle: boolean
|
bundle: boolean
|
||||||
): ExtractedCacheEntryDefinition => {
|
): ExtractedCacheEntryDefinition => {
|
||||||
const resolvedPattern = patterns.map(x => path.resolve(this.gradleUserHome, x)).join('\n')
|
const resolvedPatterns = patterns
|
||||||
return new ExtractedCacheEntryDefinition(artifactType, resolvedPattern, bundle)
|
.map(x => {
|
||||||
|
const isDir = x.endsWith('/')
|
||||||
|
const resolved = path.resolve(this.gradleUserHome, x)
|
||||||
|
return isDir ? `${resolved}/` : resolved // Restore trailing '/' removed by path.resolve()
|
||||||
|
})
|
||||||
|
.join('\n')
|
||||||
|
return new ExtractedCacheEntryDefinition(artifactType, resolvedPatterns, bundle)
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
entryDefinition('generated-gradle-jars', ['caches/*/generated-gradle-jars/*.jar'], false),
|
entryDefinition('generated-gradle-jars', ['caches/*/generated-gradle-jars/*.jar'], false),
|
||||||
entryDefinition('wrapper-zips', ['wrapper/dists/*/*/*.zip'], false),
|
entryDefinition('wrapper-zips', ['wrapper/dists/*/*/*/'], false), // Directories only
|
||||||
entryDefinition('java-toolchains', ['jdks/*.zip', 'jdks/*.tar.gz'], false),
|
entryDefinition('java-toolchains', ['jdks/*.zip', 'jdks/*.tar.gz'], false),
|
||||||
entryDefinition('dependencies', ['caches/modules-*/files-*/*/*/*/*'], true),
|
entryDefinition('dependencies', ['caches/modules-*/files-*/*/*/*/*'], true),
|
||||||
entryDefinition('instrumented-jars', ['caches/jars-*/*'], true),
|
entryDefinition('instrumented-jars', ['caches/jars-*/*'], true),
|
||||||
|
|
Loading…
Reference in a new issue