Skip to content

Commit a8c1d97

Browse files
committed
Hide HTML report generator output by default
1 parent 5f1159d commit a8c1d97

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

gradle/plugins/build-parameters/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ buildParameters {
7676
integer("retries") {
7777
description = "Configures the number of times failing test are retried"
7878
}
79+
bool("hideOpenTestReportHtmlGeneratorOutput") {
80+
description = "Whether or not to hide the output of the OpenTestReportHtmlGenerator"
81+
defaultValue = true
82+
}
7983
}
8084
group("publishing") {
8185
bool("signArtifacts") {

gradle/plugins/common/src/main/kotlin/junitbuild.testing-conventions.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import org.gradle.api.tasks.PathSensitivity.RELATIVE
55
import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
66
import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED
77
import org.gradle.internal.os.OperatingSystem
8+
import java.io.OutputStream
89

910
plugins {
1011
`java-library`
@@ -34,6 +35,13 @@ val generateOpenTestHtmlReport by tasks.registering(JavaExec::class) {
3435
})
3536
outputLocation = layout.buildDirectory.file("reports/open-test-report.html")
3637
}
38+
if (buildParameters.testing.hideOpenTestReportHtmlGeneratorOutput) {
39+
standardOutput = object : OutputStream() {
40+
override fun write(b: Int) {
41+
// discard output
42+
}
43+
}
44+
}
3745
outputs.cacheIf { true }
3846
}
3947

0 commit comments

Comments
 (0)