Commit 34a24f5d authored by Him188's avatar Him188

Add bintray availability check

parent bb548fc2
......@@ -14,6 +14,14 @@ import java.io.File
*/
object Bintray {
@JvmStatic
fun isBintrayAvailable(project: Project): Boolean {
return kotlin.runCatching {
getUser(project)
getKey(project)
}.isSuccess
}
@JvmStatic
fun getUser(project: Project): String {
kotlin.runCatching {
......
......@@ -3,6 +3,12 @@ import upload.Bintray
// 部分源码来自 kotlinx.coroutines
// Source code from kotlinx.coroutines
if (!Bintray.isBintrayAvailable(project)) {
println("bintray isn't available. NO PUBLICATIONS WILL BE SET")
return
}
def pomConfig = {
licenses {
license {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment