mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 00:38:11 -07:00
Ascii art.
This commit is contained in:
parent
6e6c1a1de3
commit
e55b9f0607
3 changed files with 14 additions and 6 deletions
|
@ -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> {
|
fun box(strings: List<String>) : List<String> {
|
||||||
val ul = "\u2554"
|
val ul = "\u2554"
|
||||||
val ur = "\u2557"
|
val ur = "\u2557"
|
||||||
val h = "\u2550"
|
val h = horizontalDoubleLine
|
||||||
val v = "\u2551"
|
val v = "\u2551"
|
||||||
val bl = "\u255a"
|
val bl = "\u255a"
|
||||||
val br = "\u255d"
|
val br = "\u255d"
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.beust.kobalt
|
package com.beust.kobalt
|
||||||
|
|
||||||
import com.beust.jcommander.JCommander
|
import com.beust.jcommander.JCommander
|
||||||
|
import com.beust.kobalt.api.IClasspathDependency
|
||||||
import com.beust.kobalt.api.Kobalt
|
import com.beust.kobalt.api.Kobalt
|
||||||
import com.beust.kobalt.api.Project
|
import com.beust.kobalt.api.Project
|
||||||
import com.beust.kobalt.internal.PluginInfo
|
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.DepFactory
|
||||||
import com.beust.kobalt.maven.Http
|
import com.beust.kobalt.maven.Http
|
||||||
import com.beust.kobalt.maven.LocalRepo
|
import com.beust.kobalt.maven.LocalRepo
|
||||||
import com.beust.kobalt.api.IClasspathDependency
|
|
||||||
import com.beust.kobalt.misc.*
|
import com.beust.kobalt.misc.*
|
||||||
import com.google.inject.Guice
|
import com.google.inject.Guice
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
@ -180,7 +180,8 @@ private class Main @Inject constructor(
|
||||||
val sb = StringBuffer("List of tasks\n")
|
val sb = StringBuffer("List of tasks\n")
|
||||||
Plugins.plugins.forEach { plugin ->
|
Plugins.plugins.forEach { plugin ->
|
||||||
if (plugin.tasks.size > 0) {
|
if (plugin.tasks.size > 0) {
|
||||||
sb.append("\n ===== ${plugin.name} =====\n")
|
sb.append("\n " + AsciiArt.horizontalDoubleLine +" ${plugin.name} "
|
||||||
|
+ AsciiArt.horizontalDoubleLine + "\n")
|
||||||
plugin.tasks.distinctBy {
|
plugin.tasks.distinctBy {
|
||||||
it.name
|
it.name
|
||||||
}.forEach { task ->
|
}.forEach { task ->
|
||||||
|
|
|
@ -221,7 +221,7 @@ class TaskWorker(val tasks: List<PluginTask>, val dryRun: Boolean) : IWorker<Plu
|
||||||
override fun call() : TaskResult2<PluginTask> {
|
override fun call() : TaskResult2<PluginTask> {
|
||||||
if (tasks.size > 0) {
|
if (tasks.size > 0) {
|
||||||
tasks[0].let {
|
tasks[0].let {
|
||||||
log(1, "========== ${it.project.name}:${it.name}")
|
log(1, AsciiArt.horizontalSingleLine + " ${it.project.name}:${it.name}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var success = true
|
var success = true
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue