mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Logs.
This commit is contained in:
parent
c1214c9994
commit
46f847b90a
5 changed files with 8 additions and 10 deletions
|
@ -57,6 +57,6 @@ public class PomGenerator @Inject constructor(@Assisted val project: Project) {
|
||||||
val pomFile = SimpleDep(project.group!!, project.artifactId!!, project.version!!).toPomFileName()
|
val pomFile = SimpleDep(project.group!!, project.artifactId!!, project.version!!).toPomFileName()
|
||||||
val outputFile = File(outputDir, pomFile)
|
val outputFile = File(outputDir, pomFile)
|
||||||
outputFile.writeText(s.toString(), Charset.defaultCharset())
|
outputFile.writeText(s.toString(), Charset.defaultCharset())
|
||||||
log(1, "Wrote $outputFile")
|
log(1, " Wrote $outputFile")
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -65,8 +65,8 @@ public class JavaPlugin @Inject constructor(
|
||||||
// pb.redirectError(File("/tmp/kobalt-err"))
|
// pb.redirectError(File("/tmp/kobalt-err"))
|
||||||
// pb.redirectOutput(File("/tmp/kobalt-out"))
|
// pb.redirectOutput(File("/tmp/kobalt-out"))
|
||||||
val line = args.join(" ")
|
val line = args.join(" ")
|
||||||
log(1, "Compiling ${sourceFiles.size()} files with classpath size ${cpList.size()}")
|
log(1, " Compiling ${sourceFiles.size()} files with classpath size ${cpList.size()}")
|
||||||
log(2, "Compiling ${project}:\n${line}")
|
log(2, " Compiling $project:\n$line")
|
||||||
val process = pb.start()
|
val process = pb.start()
|
||||||
val errorCode = process.waitFor()
|
val errorCode = process.waitFor()
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class KotlinPlugin @Inject constructor(
|
||||||
outputDirectory: String): TaskResult {
|
outputDirectory: String): TaskResult {
|
||||||
File(outputDirectory).mkdirs()
|
File(outputDirectory).mkdirs()
|
||||||
|
|
||||||
log(1, "Compiling ${sources.size()} files with classpath size ${cpList.size()}")
|
log(1, " Compiling ${sources.size()} files with classpath size ${cpList.size()}")
|
||||||
|
|
||||||
return kotlinCompilePrivate {
|
return kotlinCompilePrivate {
|
||||||
classpath(cpList.map { it.jarFile.get().absolutePath })
|
classpath(cpList.map { it.jarFile.get().absolutePath })
|
||||||
|
|
|
@ -218,7 +218,7 @@ public class PackagingPlugin @Inject constructor(val dependencyManager : Depende
|
||||||
log(2, "Added ${includedFiles.size()} files to ${result}")
|
log(2, "Added ${includedFiles.size()} files to ${result}")
|
||||||
outStream.flush()
|
outStream.flush()
|
||||||
outStream.close()
|
outStream.close()
|
||||||
log(1, "Created ${result}")
|
log(1, " Created ${result}")
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ package com.beust.kobalt.plugin.publish
|
||||||
|
|
||||||
import com.beust.klaxon.*
|
import com.beust.klaxon.*
|
||||||
import com.beust.kobalt.api.Project
|
import com.beust.kobalt.api.Project
|
||||||
import com.beust.kobalt.dots
|
|
||||||
import com.beust.kobalt.internal.TaskResult
|
import com.beust.kobalt.internal.TaskResult
|
||||||
import com.beust.kobalt.maven.Gpg
|
import com.beust.kobalt.maven.Gpg
|
||||||
import com.beust.kobalt.maven.Http
|
import com.beust.kobalt.maven.Http
|
||||||
|
@ -15,7 +14,6 @@ import org.jetbrains.annotations.Nullable
|
||||||
import java.io.ByteArrayInputStream
|
import java.io.ByteArrayInputStream
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.nio.charset.Charset
|
import java.nio.charset.Charset
|
||||||
import java.util.concurrent.Callable
|
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
data class JCenterPackage(val jo: JsonObject) {
|
data class JCenterPackage(val jo: JsonObject) {
|
||||||
|
@ -137,7 +135,7 @@ public class JCenterApi @Inject constructor (@Nullable @Assisted("username") val
|
||||||
//
|
//
|
||||||
val fileCount = filesToUpload.size()
|
val fileCount = filesToUpload.size()
|
||||||
if (fileCount > 0) {
|
if (fileCount > 0) {
|
||||||
log(1, "Found $fileCount artifacts to upload: " + filesToUpload.get(0)
|
log(1, " Found $fileCount artifacts to upload: " + filesToUpload.get(0)
|
||||||
+ if (fileCount > 1) "..." else "")
|
+ if (fileCount > 1) "..." else "")
|
||||||
var i = 1
|
var i = 1
|
||||||
val errorMessages = arrayListOf<String>()
|
val errorMessages = arrayListOf<String>()
|
||||||
|
@ -158,12 +156,12 @@ public class JCenterApi @Inject constructor (@Nullable @Assisted("username") val
|
||||||
errorMessages.add(jo.string("message") ?: "No message found")
|
errorMessages.add(jo.string("message") ?: "No message found")
|
||||||
})
|
})
|
||||||
val end = if (i >= fileCount) "\n" else ""
|
val end = if (i >= fileCount) "\n" else ""
|
||||||
log(1, " Uploading " + (i++) + " / $fileCount$end " + dots(fileCount, results), false)
|
log(1, " Uploading " + (i++) + " / $fileCount$end " + dots(fileCount, results), false)
|
||||||
}
|
}
|
||||||
if (errorMessages.isEmpty()) {
|
if (errorMessages.isEmpty()) {
|
||||||
return TaskResult()
|
return TaskResult()
|
||||||
} else {
|
} else {
|
||||||
error("Errors while uploading:\n" + errorMessages.map { " $it" }.join("\n"))
|
error("Errors while uploading:\n" + errorMessages.map { " $it" }.join("\n"))
|
||||||
return TaskResult(false, errorMessages.join("\n"))
|
return TaskResult(false, errorMessages.join("\n"))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue