Add "showAllOutput" project property

Added a property to show all test output, useful for debugging.

Usage: ./gradlew -PshowAllOutput=true build
Tested:
  Verified that the property does the right thing for true and false values
  and verified that the build doesn't show test output if it's omitted.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=225854375
This commit is contained in:
mmuller 2018-12-17 10:59:27 -08:00 committed by Michael Muller
parent 9d6a7ef66a
commit 214fb49091

View file

@ -20,6 +20,13 @@ plugins {
id 'com.bmuschko.docker-java-application' version '4.0.4' apply false
}
// Provide defaults for all of the project properties.
// showAllOutput: boolean. If true, dump all test output during the build.
if (!project.hasProperty('showAllOutput')) {
ext.showAllOutput = 'false'
}
// Only do linting if the build is successful.
gradleLint.autoLintAfterFailure = false
@ -245,6 +252,10 @@ subprojects {
}
}
test {
testLogging.showStandardStreams = Boolean.parseBoolean(showAllOutput)
}
if (project.name == 'core') return
ext.relativePath = "google/registry/${project.name}"