@@ -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 {