build: remove devNull variable

This is an imperceptible optimization by reducing the scope of the null stream object
This commit is contained in:
Jonas Tobias Hopusch 2022-03-12 12:24:54 +01:00
parent 8c6d65f147
commit e66e3b8483
Failed to generate hash of commit

View file

@ -20,11 +20,10 @@ dependencies {
fun versionBanner(): String { fun versionBanner(): String {
val os = ByteArrayOutputStream() val os = ByteArrayOutputStream()
val devNull = OutputStream.nullOutputStream()
project.exec { project.exec {
commandLine = "git describe --tags --always --dirty --abbrev".split(" ") commandLine = "git describe --tags --always --dirty --abbrev".split(" ")
standardOutput = os standardOutput = os
errorOutput = devNull errorOutput = OutputStream.nullOutputStream()
} }
return String(os.toByteArray()).trim() return String(os.toByteArray()).trim()
} }