Do not generate dependency graph in cache-cleanup

- Allow environment variables to be overridden by system properties in dependency-graph initscript
- Set `GITHUB_DEPENDENCY_GRAPH_ENABLED=false` when executing Gradle for cache cleanup
This commit is contained in:
daz
2023-09-29 14:43:03 -06:00
committed by Daz DeBoer
parent 6fcc109efa
commit d1b726d8c1
6 changed files with 18 additions and 8 deletions

View File

@@ -42,7 +42,8 @@ export class CacheCleaner {
)
fs.writeFileSync(path.resolve(cleanupProjectDir, 'build.gradle'), 'task("noop") {}')
await exec.exec(`gradle -g ${this.gradleUserHome} --no-daemon --build-cache --no-scan --quiet noop`, [], {
const gradleCommand = `gradle -g ${this.gradleUserHome} --no-daemon --build-cache --no-scan --quiet -DGITHUB_DEPENDENCY_GRAPH_ENABLED=false noop`
await exec.exec(gradleCommand, [], {
cwd: cleanupProjectDir
})
}