1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-29 17:38:12 -07:00

First pass at introducing ITaskContributor.

This commit is contained in:
Cedric Beust 2015-12-04 17:23:36 -08:00
parent baf06a9fb7
commit 235ff7337f
8 changed files with 109 additions and 87 deletions

View file

@ -178,18 +178,14 @@ private class Main @Inject constructor(
// List of tasks
//
val sb = StringBuffer("List of tasks\n")
Plugins.plugins.forEach { plugin ->
if (plugin.tasks.size > 0) {
sb.append("\n " + AsciiArt.horizontalDoubleLine +" ${plugin.name} "
+ AsciiArt.horizontalDoubleLine + "\n")
plugin.tasks.distinctBy {
it.name
}.forEach { task ->
sb.append(" ${task.name}\t\t${task.doc}\n")
}
}
taskManager.tasks.distinctBy {
it.name
}.forEach { task ->
sb.append("\n " + AsciiArt.horizontalDoubleLine +" ${task.plugin.name} "
+ AsciiArt.horizontalDoubleLine + "\n")
sb.append(" ${task.name}\t\t${task.doc}\n")
println(sb.toString())
}
println(sb.toString())
} else if (args.checkVersions) {
checkVersions.run(allProjects)
} else if (args.download) {