Skip to content

Commit

Permalink
Hide HTML report generator output by default
Browse files Browse the repository at this point in the history
  • Loading branch information
marcphilipp committed Nov 29, 2024
1 parent 5f1159d commit a8c1d97
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gradle/plugins/build-parameters/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ buildParameters {
integer("retries") {
description = "Configures the number of times failing test are retried"
}
bool("hideOpenTestReportHtmlGeneratorOutput") {
description = "Whether or not to hide the output of the OpenTestReportHtmlGenerator"
defaultValue = true
}
}
group("publishing") {
bool("signArtifacts") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import org.gradle.api.tasks.PathSensitivity.RELATIVE
import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED
import org.gradle.internal.os.OperatingSystem
import java.io.OutputStream

plugins {
`java-library`
Expand Down Expand Up @@ -34,6 +35,13 @@ val generateOpenTestHtmlReport by tasks.registering(JavaExec::class) {
})
outputLocation = layout.buildDirectory.file("reports/open-test-report.html")
}
if (buildParameters.testing.hideOpenTestReportHtmlGeneratorOutput) {
standardOutput = object : OutputStream() {
override fun write(b: Int) {
// discard output
}
}
}
outputs.cacheIf { true }
}

Expand Down

0 comments on commit a8c1d97

Please sign in to comment.