mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-14 20:50:09 +08:00
Add bintray availability check
This commit is contained in:
parent
bb548fc20c
commit
34a24f5df4
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user