Make build-result-capture script compatible with config-cache

This commit is contained in:
Daz DeBoer 2022-06-03 07:12:23 -06:00
parent 8aaf080d68
commit 6cc033f2b3
No known key found for this signature in database
GPG key ID: DD6B9F0B06683D5D

View file

@ -27,7 +27,10 @@ if (isTopLevelBuild) {
def registerCallbacks(buildScanExtension, rootProjectName) {
buildScanExtension.with {
def requestedTasks = gradle.startParameter.taskNames.join(" ")
def gradleVersion = GradleVersion.current().version
def buildFailed = false
buildFinished { result ->
buildFailed = (result.failure != null)
}
@ -38,8 +41,6 @@ def registerCallbacks(buildScanExtension, rootProjectName) {
def buildResultsFile = new File(buildResultsDir, System.getenv("GITHUB_ACTION") + System.currentTimeMillis() + ".json")
def requestedTasks = gradle.startParameter.taskNames.join(" ")
def gradleVersion = GradleVersion.current().version
def buildScanUri = buildScan.buildScanUri.toASCIIString()
def buildResults = [
rootProject: rootProjectName,