mirror of
https://github.com/gradle/actions
synced 2024-11-23 18:02:13 +00:00
Use logger in dependency graph init script (#191)
Dependency graph init script now uses Gradle logger to emit warning/info messages. This allows these messages to be suppressed using `--quiet`.
This commit is contained in:
parent
750cdda3ed
commit
6ccde15122
1 changed files with 3 additions and 3 deletions
|
@ -12,7 +12,7 @@ if (gradleVersion < GradleVersion.version("5.2") ||
|
|||
if (getVariable('GITHUB_DEPENDENCY_GRAPH_CONTINUE_ON_FAILURE') != "true") {
|
||||
throw new GradleException("Dependency Graph is not supported for ${gradleVersion}. No dependency snapshot will be generated.")
|
||||
}
|
||||
println "::warning::Dependency Graph is not supported for ${gradleVersion}. No dependency snapshot will be generated."
|
||||
logger.warn("::warning::Dependency Graph is not supported for ${gradleVersion}. No dependency snapshot will be generated.")
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -23,11 +23,11 @@ if (isTopLevelBuild) {
|
|||
def reportFile = getUniqueReportFile(getVariable('GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR'))
|
||||
|
||||
if (reportFile == null) {
|
||||
println "::warning::No dependency snapshot generated for step. Could not determine unique job correlator - specify GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR var for this step."
|
||||
logger.warn("::warning::No dependency snapshot generated for step. Could not determine unique job correlator - specify GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR var for this step.")
|
||||
return
|
||||
}
|
||||
|
||||
println "Generating dependency graph into '${reportFile}'"
|
||||
logger.lifecycle("Generating dependency graph into '${reportFile}'")
|
||||
}
|
||||
|
||||
apply from: 'gradle-actions.github-dependency-graph-gradle-plugin-apply.groovy'
|
||||
|
|
Loading…
Reference in a new issue