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

Ascii art.

This commit is contained in:
Cedric Beust 2015-11-29 14:07:48 -08:00
parent 6e6c1a1de3
commit e55b9f0607
3 changed files with 14 additions and 6 deletions

View file

@ -20,14 +20,21 @@ class AsciiArt {
" |_|\\_\\ \\___/ |_.__/ \\__,_| |_| \\__| "
)
val banner : String get() = BANNERS.get(Random().nextInt(BANNERS.size))
val banner : String get() = BANNERS[Random().nextInt(BANNERS.size)]
fun box(s: String) : List<String> = box(listOf(s))
// fun box(s: String) : List<String> = box(listOf(s))
val horizontalSingleLine = "\u2500\u2500\u2500\u2500\u2500"
val horizontalDoubleLine = "\u2550\u2550\u2550\u2550\u2550"
// fun horizontalLine(n: Int) = StringBuffer().apply {
// repeat(n, { append("\u2500") })
// }.toString()
fun box(strings: List<String>) : List<String> {
val ul = "\u2554"
val ur = "\u2557"
val h = "\u2550"
val h = horizontalDoubleLine
val v = "\u2551"
val bl = "\u255a"
val br = "\u255d"

View file

@ -1,6 +1,7 @@
package com.beust.kobalt
import com.beust.jcommander.JCommander
import com.beust.kobalt.api.IClasspathDependency
import com.beust.kobalt.api.Kobalt
import com.beust.kobalt.api.Project
import com.beust.kobalt.internal.PluginInfo
@ -12,7 +13,6 @@ import com.beust.kobalt.internal.remote.KobaltServer
import com.beust.kobalt.maven.DepFactory
import com.beust.kobalt.maven.Http
import com.beust.kobalt.maven.LocalRepo
import com.beust.kobalt.api.IClasspathDependency
import com.beust.kobalt.misc.*
import com.google.inject.Guice
import java.io.File
@ -180,7 +180,8 @@ private class Main @Inject constructor(
val sb = StringBuffer("List of tasks\n")
Plugins.plugins.forEach { plugin ->
if (plugin.tasks.size > 0) {
sb.append("\n ===== ${plugin.name} =====\n")
sb.append("\n " + AsciiArt.horizontalDoubleLine +" ${plugin.name} "
+ AsciiArt.horizontalDoubleLine + "\n")
plugin.tasks.distinctBy {
it.name
}.forEach { task ->

View file

@ -221,7 +221,7 @@ class TaskWorker(val tasks: List<PluginTask>, val dryRun: Boolean) : IWorker<Plu
override fun call() : TaskResult2<PluginTask> {
if (tasks.size > 0) {
tasks[0].let {
log(1, "========== ${it.project.name}:${it.name}")
log(1, AsciiArt.horizontalSingleLine + " ${it.project.name}:${it.name}")
}
}
var success = true