1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00

Introduce build listeners and build report contributors.

This commit is contained in:
Cedric Beust 2016-07-30 07:36:03 -07:00
parent f629b76658
commit 007bb31ee3
7 changed files with 86 additions and 19 deletions

View file

@ -213,14 +213,9 @@ private class Main @Inject constructor(
// Shutdown all plug-ins
plugins.shutdownPlugins()
// Display timings if requested
if (args.profiling) {
log(1, "\n" + AsciiArt.horizontalSingleLine + " Timings (in seconds)")
runTargetResult.timings.sortedByDescending { it.durationMillis }.forEach {
log(1, String.format("%1$10.2f", it.durationMillis.toDouble() / 1000)
+ " " + it.taskName)
}
log(1, "\n")
// Run the build report contributors
pluginInfo.buildReportContributors.forEach {
it.generateReport(Kobalt.context!!)
}
}
}