mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-06-07 16:56:12 +02:00
Update to dep-graph plugin 0.4.0
This commit is contained in:
parent
b5126f31db
commit
4441c9f9bf
4 changed files with 14 additions and 11 deletions
|
@ -3,7 +3,7 @@ buildscript {
|
|||
maven { url "https://plugins.gradle.org/m2/" }
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.gradle:github-dependency-graph-gradle-plugin:0.2.0"
|
||||
classpath "org.gradle:github-dependency-graph-gradle-plugin:0.4.0"
|
||||
}
|
||||
}
|
||||
apply plugin: org.gradle.github.GitHubDependencyGraphPlugin
|
||||
|
|
|
@ -15,10 +15,10 @@ if (GradleVersion.current().baseVersion < GradleVersion.version("5.0")) {
|
|||
// This is only required for top-level builds
|
||||
def isTopLevelBuild = gradle.getParent() == null
|
||||
if (isTopLevelBuild) {
|
||||
def reportFile = getUniqueReportFile(System.env.GITHUB_JOB_CORRELATOR)
|
||||
def reportFile = getUniqueReportFile(System.env.GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR)
|
||||
|
||||
if (reportFile == null) {
|
||||
println "::warning::No dependency snapshot generated for step. Could not determine unique job correlator - specify GITHUB_JOB_CORRELATOR var for this step."
|
||||
println "::warning::No dependency snapshot generated for step. Could not determine unique job correlator - specify GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR var for this step."
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ File getUniqueReportFile(String jobCorrelator) {
|
|||
def candidateCorrelator = jobCorrelator + "-" + i
|
||||
def candidateFile = new File(reportDir, candidateCorrelator + ".json")
|
||||
if (!candidateFile.exists()) {
|
||||
System.properties['GITHUB_JOB_CORRELATOR'] = candidateCorrelator
|
||||
System.properties['GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR'] = candidateCorrelator
|
||||
return candidateFile
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue