From 49e33892dbe5173264304e7a7920d76eb20276f3 Mon Sep 17 00:00:00 2001 From: Alex Serbin Date: Fri, 19 Apr 2024 11:02:39 +0200 Subject: [PATCH 1/2] use logger in dependency graph init script --- .../gradle-actions.github-dependency-graph.init.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/src/resources/init-scripts/gradle-actions.github-dependency-graph.init.gradle b/sources/src/resources/init-scripts/gradle-actions.github-dependency-graph.init.gradle index ae03c185..e1c2188c 100644 --- a/sources/src/resources/init-scripts/gradle-actions.github-dependency-graph.init.gradle +++ b/sources/src/resources/init-scripts/gradle-actions.github-dependency-graph.init.gradle @@ -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.warning("::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.warning("::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' From 3ceee92c845eb1dc216265cbcc3ad2e6f86a904f Mon Sep 17 00:00:00 2001 From: Alex Serbin Date: Fri, 19 Apr 2024 11:13:05 +0200 Subject: [PATCH 2/2] fix warn method name --- .../gradle-actions.github-dependency-graph.init.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/src/resources/init-scripts/gradle-actions.github-dependency-graph.init.gradle b/sources/src/resources/init-scripts/gradle-actions.github-dependency-graph.init.gradle index e1c2188c..5a159921 100644 --- a/sources/src/resources/init-scripts/gradle-actions.github-dependency-graph.init.gradle +++ b/sources/src/resources/init-scripts/gradle-actions.github-dependency-graph.init.gradle @@ -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.") } - logger.warning("::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,7 +23,7 @@ if (isTopLevelBuild) { def reportFile = getUniqueReportFile(getVariable('GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR')) if (reportFile == null) { - logger.warning("::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 }