in src/main/kotlin/org/jetbrains/grammarkit/tasks/GenerateLexerTask.kt [117:131]
override fun exec() {
if (purgeOldFiles.orNull == true) {
targetOutputDir.asFile.get().deleteRecursively()
}
ByteArrayOutputStream().use { os ->
try {
args = getArguments()
errorOutput = TeeOutputStream(System.out, os)
standardOutput = TeeOutputStream(System.out, os)
super.exec()
} catch (e: Exception) {
throw GradleException(os.toString().trim(), e)
}
}
}