mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Better error reporting.
This commit is contained in:
parent
9d02f020a6
commit
48ae5d966f
19 changed files with 71 additions and 47 deletions
|
@ -1,6 +1,5 @@
|
||||||
package com.beust.kobalt
|
package com.beust.kobalt
|
||||||
|
|
||||||
import com.beust.kobalt.maven.KobaltException
|
|
||||||
import com.beust.kobalt.misc.log
|
import com.beust.kobalt.misc.log
|
||||||
import com.beust.kobalt.misc.warn
|
import com.beust.kobalt.misc.warn
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
@ -31,7 +30,7 @@ public open class Jvm constructor(
|
||||||
if (javaBase == null) {
|
if (javaBase == null) {
|
||||||
//discover based on what's in the sys. property
|
//discover based on what's in the sys. property
|
||||||
try {
|
try {
|
||||||
javaBase = File(System.getProperty("java.home")).getCanonicalFile()
|
javaBase = File(System.getProperty("java.home")).canonicalFile
|
||||||
} catch (e: IOException) {
|
} catch (e: IOException) {
|
||||||
throw KobaltException(e)
|
throw KobaltException(e)
|
||||||
}
|
}
|
||||||
|
@ -52,10 +51,10 @@ public open class Jvm constructor(
|
||||||
private fun findJavaHome(javaBase: File): File {
|
private fun findJavaHome(javaBase: File): File {
|
||||||
val toolsJar = findToolsJar(javaBase)
|
val toolsJar = findToolsJar(javaBase)
|
||||||
if (toolsJar != null) {
|
if (toolsJar != null) {
|
||||||
return toolsJar.getParentFile().getParentFile()
|
return toolsJar.parentFile.parentFile
|
||||||
} else if (javaBase.getName().equals("jre", true) && File(javaBase.getParentFile(),
|
} else if (javaBase.name.equals("jre", true) && File(javaBase.parentFile,
|
||||||
"bin/java").exists()) {
|
"bin/java").exists()) {
|
||||||
return javaBase.getParentFile()
|
return javaBase.parentFile
|
||||||
} else {
|
} else {
|
||||||
return javaBase
|
return javaBase
|
||||||
}
|
}
|
||||||
|
|
7
src/main/kotlin/com/beust/kobalt/KobaltException.kt
Normal file
7
src/main/kotlin/com/beust/kobalt/KobaltException.kt
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
package com.beust.kobalt
|
||||||
|
|
||||||
|
class KobaltException(s: String? = null, ex: Throwable? = null, val docUrl: String? = null)
|
||||||
|
: RuntimeException(s, ex) {
|
||||||
|
constructor(ex: Throwable?) : this(null, ex, null)
|
||||||
|
}
|
||||||
|
|
|
@ -11,7 +11,6 @@ import com.beust.kobalt.kotlin.BuildFile
|
||||||
import com.beust.kobalt.kotlin.BuildFileCompiler
|
import com.beust.kobalt.kotlin.BuildFileCompiler
|
||||||
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.KobaltException
|
|
||||||
import com.beust.kobalt.maven.LocalRepo
|
import com.beust.kobalt.maven.LocalRepo
|
||||||
import com.beust.kobalt.misc.*
|
import com.beust.kobalt.misc.*
|
||||||
import com.google.inject.Guice
|
import com.google.inject.Guice
|
||||||
|
@ -95,7 +94,7 @@ private class Main @Inject constructor(
|
||||||
try {
|
try {
|
||||||
result = runWithArgs(jc, args, argv)
|
result = runWithArgs(jc, args, argv)
|
||||||
} catch(ex: KobaltException) {
|
} catch(ex: KobaltException) {
|
||||||
error(ex.message ?: "", ex)
|
error("", ex)
|
||||||
result = 1
|
result = 1
|
||||||
} finally {
|
} finally {
|
||||||
executors.shutdown()
|
executors.shutdown()
|
||||||
|
|
|
@ -6,7 +6,6 @@ import com.beust.kobalt.internal.PluginInfo
|
||||||
import com.beust.kobalt.internal.TaskManager
|
import com.beust.kobalt.internal.TaskManager
|
||||||
import com.beust.kobalt.maven.DepFactory
|
import com.beust.kobalt.maven.DepFactory
|
||||||
import com.beust.kobalt.maven.IClasspathDependency
|
import com.beust.kobalt.maven.IClasspathDependency
|
||||||
import com.beust.kobalt.maven.KobaltException
|
|
||||||
import com.beust.kobalt.maven.LocalRepo
|
import com.beust.kobalt.maven.LocalRepo
|
||||||
import com.beust.kobalt.misc.KFiles
|
import com.beust.kobalt.misc.KFiles
|
||||||
import com.beust.kobalt.misc.KobaltExecutors
|
import com.beust.kobalt.misc.KobaltExecutors
|
||||||
|
@ -100,11 +99,7 @@ public class Plugins @Inject constructor (val taskManagerProvider : Provider<Tas
|
||||||
|
|
||||||
fun toTask(m: Method, project: Project, plugin: IPlugin): (Project) -> TaskResult {
|
fun toTask(m: Method, project: Project, plugin: IPlugin): (Project) -> TaskResult {
|
||||||
val result: (Project) -> TaskResult = {
|
val result: (Project) -> TaskResult = {
|
||||||
try {
|
m.invoke(plugin, project) as TaskResult
|
||||||
m.invoke(plugin, project) as TaskResult
|
|
||||||
} catch(ex: Throwable) {
|
|
||||||
throw KobaltException("Error while invoking task $m on plugin $plugin")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
11
src/main/kotlin/com/beust/kobalt/internal/DocUrl.kt
Normal file
11
src/main/kotlin/com/beust/kobalt/internal/DocUrl.kt
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
package com.beust.kobalt.internal
|
||||||
|
|
||||||
|
class DocUrl {
|
||||||
|
companion object {
|
||||||
|
private const val HOST = "http://beust.com/kobalt/"
|
||||||
|
private fun url(path: String) = HOST + path
|
||||||
|
|
||||||
|
val PUBLISH_PLUGIN_URL = url("plug-ins/index.html#publishing")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
package com.beust.kobalt.internal
|
package com.beust.kobalt.internal
|
||||||
|
|
||||||
|
import com.beust.kobalt.KobaltException
|
||||||
import com.beust.kobalt.TaskResult
|
import com.beust.kobalt.TaskResult
|
||||||
import com.beust.kobalt.misc.NamedThreadFactory
|
import com.beust.kobalt.misc.NamedThreadFactory
|
||||||
|
import com.beust.kobalt.misc.error
|
||||||
import com.beust.kobalt.misc.log
|
import com.beust.kobalt.misc.log
|
||||||
import com.beust.kobalt.misc.*
|
import com.beust.kobalt.misc.toString
|
||||||
import com.google.common.collect.HashMultimap
|
import com.google.common.collect.HashMultimap
|
||||||
|
import java.lang.reflect.InvocationTargetException
|
||||||
import java.util.concurrent.*
|
import java.util.concurrent.*
|
||||||
|
|
||||||
open class TaskResult2<T>(success: Boolean, val value: T) : TaskResult(success) {
|
open class TaskResult2<T>(success: Boolean, val value: T) : TaskResult(success) {
|
||||||
|
@ -73,8 +76,13 @@ public class DynamicGraphExecutor<T>(val graph: DynamicGraph<T>,
|
||||||
} catch(ex: TimeoutException) {
|
} catch(ex: TimeoutException) {
|
||||||
log(2, "Time out")
|
log(2, "Time out")
|
||||||
} catch(ex: Exception) {
|
} catch(ex: Exception) {
|
||||||
error("Error: ${ex.message}", ex)
|
if (ex.cause is InvocationTargetException
|
||||||
gotError = true
|
&& (ex.cause as InvocationTargetException).targetException is KobaltException) {
|
||||||
|
throw (ex.cause as InvocationTargetException).targetException
|
||||||
|
} else {
|
||||||
|
error("Error: ${ex.message}", ex)
|
||||||
|
gotError = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package com.beust.kobalt.internal
|
package com.beust.kobalt.internal
|
||||||
|
|
||||||
|
import com.beust.kobalt.KobaltException
|
||||||
import com.beust.kobalt.TaskResult
|
import com.beust.kobalt.TaskResult
|
||||||
import com.beust.kobalt.api.IClasspathContributor
|
import com.beust.kobalt.api.IClasspathContributor
|
||||||
import com.beust.kobalt.api.KobaltContext
|
import com.beust.kobalt.api.KobaltContext
|
||||||
import com.beust.kobalt.api.Project
|
import com.beust.kobalt.api.Project
|
||||||
import com.beust.kobalt.maven.DependencyManager
|
import com.beust.kobalt.maven.DependencyManager
|
||||||
import com.beust.kobalt.maven.IClasspathDependency
|
import com.beust.kobalt.maven.IClasspathDependency
|
||||||
import com.beust.kobalt.maven.KobaltException
|
|
||||||
import com.google.inject.Inject
|
import com.google.inject.Inject
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
package com.beust.kobalt.internal
|
package com.beust.kobalt.internal
|
||||||
|
|
||||||
import com.beust.kobalt.Args
|
import com.beust.kobalt.*
|
||||||
import com.beust.kobalt.AsciiArt
|
|
||||||
import com.beust.kobalt.Plugins
|
|
||||||
import com.beust.kobalt.TaskResult
|
|
||||||
import com.beust.kobalt.api.PluginTask
|
import com.beust.kobalt.api.PluginTask
|
||||||
import com.beust.kobalt.api.Project
|
import com.beust.kobalt.api.Project
|
||||||
import com.beust.kobalt.maven.KobaltException
|
|
||||||
import com.beust.kobalt.misc.log
|
import com.beust.kobalt.misc.log
|
||||||
import com.google.common.collect.TreeMultimap
|
import com.google.common.collect.TreeMultimap
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
package com.beust.kobalt.kotlin
|
package com.beust.kobalt.kotlin
|
||||||
|
|
||||||
import com.beust.kobalt.Args
|
import com.beust.kobalt.Args
|
||||||
|
import com.beust.kobalt.KobaltException
|
||||||
import com.beust.kobalt.Plugins
|
import com.beust.kobalt.Plugins
|
||||||
import com.beust.kobalt.api.*
|
import com.beust.kobalt.api.*
|
||||||
import com.beust.kobalt.api.annotation.Task
|
import com.beust.kobalt.api.annotation.Task
|
||||||
import com.beust.kobalt.internal.JvmCompiler
|
import com.beust.kobalt.internal.JvmCompiler
|
||||||
import com.beust.kobalt.internal.PluginInfo
|
import com.beust.kobalt.internal.PluginInfo
|
||||||
import com.beust.kobalt.maven.IClasspathDependency
|
import com.beust.kobalt.maven.IClasspathDependency
|
||||||
import com.beust.kobalt.maven.KobaltException
|
|
||||||
import com.beust.kobalt.misc.KFiles
|
import com.beust.kobalt.misc.KFiles
|
||||||
import com.beust.kobalt.misc.Topological
|
import com.beust.kobalt.misc.Topological
|
||||||
import com.beust.kobalt.misc.countChar
|
import com.beust.kobalt.misc.countChar
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package com.beust.kobalt.maven
|
package com.beust.kobalt.maven
|
||||||
|
|
||||||
|
import com.beust.kobalt.KobaltException
|
||||||
import com.beust.kobalt.misc.KFiles
|
import com.beust.kobalt.misc.KFiles
|
||||||
import com.beust.kobalt.misc.log
|
import com.beust.kobalt.misc.log
|
||||||
import com.google.common.cache.CacheBuilder
|
import com.google.common.cache.CacheBuilder
|
||||||
import com.google.common.cache.CacheLoader
|
import com.google.common.cache.CacheLoader
|
||||||
import com.google.common.cache.LoadingCache
|
import com.google.common.cache.LoadingCache
|
||||||
import com.google.inject.assistedinject.Assisted
|
import com.google.inject.assistedinject.Assisted
|
||||||
import java.io.ByteArrayOutputStream
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.concurrent.Callable
|
import java.util.concurrent.Callable
|
||||||
import java.util.concurrent.ExecutorService
|
import java.util.concurrent.ExecutorService
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.beust.kobalt.maven
|
package com.beust.kobalt.maven
|
||||||
|
|
||||||
|
import com.beust.kobalt.KobaltException
|
||||||
import com.beust.kobalt.misc.KobaltExecutors
|
import com.beust.kobalt.misc.KobaltExecutors
|
||||||
import java.util.concurrent.ExecutorService
|
import java.util.concurrent.ExecutorService
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.beust.kobalt.maven
|
package com.beust.kobalt.maven
|
||||||
|
|
||||||
|
import com.beust.kobalt.KobaltException
|
||||||
import com.beust.kobalt.misc.CountingFileRequestBody
|
import com.beust.kobalt.misc.CountingFileRequestBody
|
||||||
import com.beust.kobalt.misc.log
|
import com.beust.kobalt.misc.log
|
||||||
import com.squareup.okhttp.*
|
import com.squareup.okhttp.*
|
||||||
|
@ -84,7 +85,3 @@ public class Http {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class KobaltException(s: String? = null, ex: Throwable? = null) : RuntimeException(s, ex) {
|
|
||||||
constructor(ex: Throwable?) : this(null, ex)
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.beust.kobalt.maven
|
package com.beust.kobalt.maven
|
||||||
|
|
||||||
|
import com.beust.kobalt.KobaltException
|
||||||
import com.beust.kobalt.api.Kobalt
|
import com.beust.kobalt.api.Kobalt
|
||||||
import com.beust.kobalt.misc.DependencyExecutor
|
import com.beust.kobalt.misc.DependencyExecutor
|
||||||
import com.beust.kobalt.misc.Versions
|
import com.beust.kobalt.misc.Versions
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
package com.beust.kobalt.misc
|
package com.beust.kobalt.misc
|
||||||
|
|
||||||
|
import com.beust.kobalt.KobaltException
|
||||||
|
import com.beust.kobalt.internal.DocUrl
|
||||||
import com.beust.kobalt.maven.Http
|
import com.beust.kobalt.maven.Http
|
||||||
import com.beust.kobalt.maven.KobaltException
|
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.google.gson.JsonArray
|
import com.google.gson.JsonArray
|
||||||
import com.google.gson.JsonObject
|
import com.google.gson.JsonObject
|
||||||
|
@ -51,8 +52,9 @@ public class GithubApi @Inject constructor(val executors: KobaltExecutors,
|
||||||
fun uploadRelease(packageName: String, tagName: String, zipFile: File) {
|
fun uploadRelease(packageName: String, tagName: String, zipFile: File) {
|
||||||
log(1, "Uploading release ${zipFile.name}")
|
log(1, "Uploading release ${zipFile.name}")
|
||||||
|
|
||||||
val username = localProperties.get(PROPERTY_USERNAME)
|
val docUrl = DocUrl.PUBLISH_PLUGIN_URL
|
||||||
val accessToken = localProperties.get(PROPERTY_ACCESS_TOKEN)
|
val username = localProperties.get(PROPERTY_USERNAME, docUrl)
|
||||||
|
val accessToken = localProperties.get(PROPERTY_ACCESS_TOKEN, docUrl)
|
||||||
try {
|
try {
|
||||||
service.createRelease(username, accessToken, packageName, CreateRelease(tagName))
|
service.createRelease(username, accessToken, packageName, CreateRelease(tagName))
|
||||||
.flatMap { response ->
|
.flatMap { response ->
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.beust.kobalt.misc
|
package com.beust.kobalt.misc
|
||||||
|
|
||||||
|
import com.beust.kobalt.KobaltException
|
||||||
import com.beust.kobalt.api.Kobalt
|
import com.beust.kobalt.api.Kobalt
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
@ -48,9 +49,15 @@ class Logger(val dev: Boolean) {
|
||||||
println(getPattern("D", "Debug ", tag, message))
|
println(getPattern("D", "Debug ", tag, message))
|
||||||
|
|
||||||
final fun error(tag: String, message: String, e: Throwable? = null) {
|
final fun error(tag: String, message: String, e: Throwable? = null) {
|
||||||
println(getPattern("***** E", "***** ERROR ", tag, message) +
|
val docUrl = if (e is KobaltException && e.docUrl != null) e.docUrl else null
|
||||||
if (e != null && KobaltLogger.LOG_LEVEL > 1) " Exception: " + e.message else "")
|
val shortMessage = if (e != null) e.message else { "<unknown error>" }
|
||||||
if (KobaltLogger.LOG_LEVEL > 0) {
|
val longMessage = "*****\n***** ERROR " + shortMessage + "\n" +
|
||||||
|
docUrl?.let { "***** Documentation: $docUrl" } +
|
||||||
|
"\n*****"
|
||||||
|
|
||||||
|
println(getPattern("***** E $shortMessage " + docUrl?.let { " Documentation: $docUrl" },
|
||||||
|
longMessage, tag, message))
|
||||||
|
if (KobaltLogger.LOG_LEVEL > 1) {
|
||||||
e?.printStackTrace()
|
e?.printStackTrace()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.beust.kobalt.misc
|
package com.beust.kobalt.misc
|
||||||
|
|
||||||
import com.beust.kobalt.maven.KobaltException
|
import com.beust.kobalt.KobaltException
|
||||||
import com.google.inject.Singleton
|
import com.google.inject.Singleton
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
import java.nio.file.Paths
|
import java.nio.file.Paths
|
||||||
|
@ -8,11 +8,12 @@ import java.util.*
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
class LocalProperties {
|
class LocalProperties {
|
||||||
|
var docUrl: String? = null
|
||||||
val localProperties: Properties by lazy {
|
val localProperties: Properties by lazy {
|
||||||
val result = Properties()
|
val result = Properties()
|
||||||
val filePath = Paths.get("local.properties")
|
val filePath = Paths.get("local.properties")
|
||||||
if (! Files.exists(filePath)) {
|
if (! Files.exists(filePath)) {
|
||||||
throw KobaltException("Couldn't find a local.properties file")
|
throw KobaltException("Couldn't find a local.properties file", docUrl = docUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
filePath.let { path ->
|
filePath.let { path ->
|
||||||
|
@ -26,8 +27,10 @@ class LocalProperties {
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
|
||||||
fun get(name: String) : String {
|
fun get(name: String, docUrl: String? = null) : String {
|
||||||
val result = localProperties.get(name) ?: throw KobaltException("Couldn't find $name in local.properties")
|
this.docUrl = docUrl
|
||||||
|
val result = localProperties[name]
|
||||||
|
?: throw KobaltException("Couldn't find $name in local.properties", docUrl = docUrl)
|
||||||
return result as String
|
return result as String
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
package com.beust.kobalt.plugin.application
|
package com.beust.kobalt.plugin.application
|
||||||
|
|
||||||
import com.beust.kobalt.JavaInfo
|
import com.beust.kobalt.*
|
||||||
import com.beust.kobalt.Plugins
|
|
||||||
import com.beust.kobalt.SystemProperties
|
|
||||||
import com.beust.kobalt.api.BasePlugin
|
import com.beust.kobalt.api.BasePlugin
|
||||||
import com.beust.kobalt.api.Project
|
import com.beust.kobalt.api.Project
|
||||||
import com.beust.kobalt.api.annotation.Directive
|
import com.beust.kobalt.api.annotation.Directive
|
||||||
import com.beust.kobalt.api.annotation.Task
|
import com.beust.kobalt.api.annotation.Task
|
||||||
import com.beust.kobalt.TaskResult
|
|
||||||
import com.beust.kobalt.maven.KobaltException
|
|
||||||
import com.beust.kobalt.misc.KobaltExecutors
|
import com.beust.kobalt.misc.KobaltExecutors
|
||||||
import com.beust.kobalt.misc.RunCommand
|
import com.beust.kobalt.misc.RunCommand
|
||||||
import com.beust.kobalt.plugin.packaging.PackagingPlugin
|
import com.beust.kobalt.plugin.packaging.PackagingPlugin
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package com.beust.kobalt.plugin.publish
|
package com.beust.kobalt.plugin.publish
|
||||||
|
|
||||||
|
import com.beust.kobalt.KobaltException
|
||||||
import com.beust.kobalt.api.Project
|
import com.beust.kobalt.api.Project
|
||||||
import com.beust.kobalt.TaskResult
|
import com.beust.kobalt.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
|
||||||
import com.beust.kobalt.maven.KobaltException
|
|
||||||
import com.beust.kobalt.maven.Md5
|
import com.beust.kobalt.maven.Md5
|
||||||
import com.beust.kobalt.misc.KobaltExecutors
|
import com.beust.kobalt.misc.KobaltExecutors
|
||||||
import com.beust.kobalt.misc.error
|
import com.beust.kobalt.misc.error
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
package com.beust.kobalt.plugin.publish
|
package com.beust.kobalt.plugin.publish
|
||||||
|
|
||||||
|
import com.beust.kobalt.TaskResult
|
||||||
import com.beust.kobalt.api.BasePlugin
|
import com.beust.kobalt.api.BasePlugin
|
||||||
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.api.annotation.Directive
|
import com.beust.kobalt.api.annotation.Directive
|
||||||
import com.beust.kobalt.api.annotation.Task
|
import com.beust.kobalt.api.annotation.Task
|
||||||
import com.beust.kobalt.TaskResult
|
import com.beust.kobalt.internal.DocUrl
|
||||||
import com.beust.kobalt.maven.PomGenerator
|
import com.beust.kobalt.maven.PomGenerator
|
||||||
import com.beust.kobalt.misc.*
|
import com.beust.kobalt.misc.*
|
||||||
import com.google.common.base.Preconditions
|
import com.google.common.base.Preconditions
|
||||||
|
@ -85,8 +86,9 @@ public class PublishPlugin @Inject constructor(val files: KFiles, val factory: P
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun uploadJcenter(project: Project) : TaskResult {
|
private fun uploadJcenter(project: Project) : TaskResult {
|
||||||
val user = localProperties.get(PROPERTY_BINTRAY_USER)
|
val docUrl = DocUrl.PUBLISH_PLUGIN_URL
|
||||||
val password = localProperties.get(PROPERTY_BINTRAY_PASSWORD)
|
val user = localProperties.get(PROPERTY_BINTRAY_USER, docUrl)
|
||||||
|
val password = localProperties.get(PROPERTY_BINTRAY_PASSWORD, docUrl)
|
||||||
|
|
||||||
val jcenter = jcenterFactory.create(user, password)
|
val jcenter = jcenterFactory.create(user, password)
|
||||||
var success = false
|
var success = false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue