Javi
03/06/2025, 9:51 AMlogging: LoggingManager
and StandardOutputListener
to being able to get the whole output of a Gradle build run. More or less I get what I wanted (I got two reports, one for standard and another one for errors, but look like if I play a bit the LoggingManager
, maybe I am able to get the exact output I have in the console).
My main concern is about performance/build time as I adding listener to each Gradle task in this way:
target.gradle.lifecycle.beforeProject { project ->
project .tasks.configureEach { task ->
task.logging.addStandardOutputListener(TaskOutputListener(it.path, standardMessages))
task.logging.addStandardErrorListener(TaskOutputListener(it.path, errorMessages))
}
}
Is there a better way to get the output?
After getting all the outputs, I am generating a report file using FlowAction
at the end of the build.