From 806628be4ad5169e8fe048c96362f55fe408a4d0 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Thu, 15 Oct 2015 03:27:27 -0700 Subject: [PATCH] Better display. --- .../kotlin/com/beust/kobalt/plugin/publish/JCenterApi.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/beust/kobalt/plugin/publish/JCenterApi.kt b/src/main/kotlin/com/beust/kobalt/plugin/publish/JCenterApi.kt index 0ae1c2f9..412606cd 100644 --- a/src/main/kotlin/com/beust/kobalt/plugin/publish/JCenterApi.kt +++ b/src/main/kotlin/com/beust/kobalt/plugin/publish/JCenterApi.kt @@ -140,15 +140,17 @@ public class JCenterApi @Inject constructor (@Nullable @Assisted("username") val + if (fileCount > 1) "..." else "") var i = 1 val errorMessages = arrayListOf() + var dots = "" filesToUpload.forEach { file -> http.uploadFile(username, password, fileToPath(file) + optionPath, file, - { }, + { r: Response -> dots += "."}, { r: Response -> + dots += "X" val jo = parseResponse(r.body().string()) errorMessages.add(jo.string("message") ?: "No message found") }) val end = if (i >= fileCount) "\n" else "" - log(1, " Uploading " + (i++) + " / $fileCount$end", false) + log(1, " Uploading " + (i++) + " / $fileCount$end $dots", false) } if (errorMessages.isEmpty()) { return TaskResult()