Allow flexible use of dependency-graph support

Adds a 'dependency-graph' parameter that has 4 options:
1. 'disabled': no dependency graph files generated (the default)
2. 'generate': dependency graph files will be generated and saved as artifacts.
3. 'generate-and-submit': dependency graph files will be generated, saved as artifacts,
   and submitted to the Dependency Submission API on job completion.
4. 'download-and-submit': any previously uploaded dependency graph artifacts will be downloaded
   and submitted to the Dependency Submission API.
This commit is contained in:
daz 2023-07-05 12:33:47 -06:00
parent 820b228f28
commit 063cc1c708
No known key found for this signature in database
5 changed files with 62 additions and 14 deletions

View file

@ -38,9 +38,7 @@ export async function setup(): Promise<void> {
core.saveState(CACHE_LISTENER, cacheListener.stringify())
if (params.isDependencyGraphEnabled()) {
dependencyGraph.prepare()
}
dependencyGraph.setup(params.getDependencyGraphOption())
}
export async function complete(): Promise<void> {
@ -64,9 +62,7 @@ export async function complete(): Promise<void> {
logJobSummary(buildResults, cacheListener)
}
if (params.isDependencyGraphEnabled()) {
dependencyGraph.uploadDependencyGraphs()
}
dependencyGraph.complete(params.getDependencyGraphOption())
}
async function determineGradleUserHome(): Promise<string> {