2020-03-01 13:00:34 +08:00
|
|
|
import java.lang.System.getProperty
|
|
|
|
import java.util.*
|
|
|
|
|
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
2020-03-07 22:23:10 +08:00
|
|
|
maven(url = "https://mirrors.huaweicloud.com/repository/maven")
|
2020-03-24 10:01:03 +08:00
|
|
|
maven(url = "https://dl.bintray.com/kotlin/kotlin-eap")
|
2020-03-01 13:00:34 +08:00
|
|
|
jcenter()
|
|
|
|
google()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2020-03-24 10:01:03 +08:00
|
|
|
classpath("com.android.tools.build:gradle:${Versions.Android.androidGradlePlugin}")
|
|
|
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.Kotlin.stdlib}")
|
|
|
|
classpath("org.jetbrains.kotlin:kotlin-serialization:${Versions.Kotlin.stdlib}")
|
|
|
|
classpath("org.jetbrains.kotlinx:atomicfu-gradle-plugin:${Versions.Kotlin.atomicFU}")
|
2020-03-01 13:00:34 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-23 19:31:22 +08:00
|
|
|
plugins {
|
2020-03-24 10:01:03 +08:00
|
|
|
id("org.jetbrains.dokka") version Versions.Kotlin.dokka apply false
|
2020-03-24 17:32:22 +08:00
|
|
|
// id("com.jfrog.bintray") version Versions.Publishing.bintray apply false
|
2020-03-23 19:31:22 +08:00
|
|
|
}
|
|
|
|
|
2020-03-01 13:00:34 +08:00
|
|
|
runCatching {
|
|
|
|
val keyProps = Properties().apply {
|
|
|
|
file("local.properties").takeIf { it.exists() }?.inputStream()?.use { load(it) }
|
|
|
|
}
|
|
|
|
if (keyProps.getProperty("sdk.dir", "").isNotEmpty()) {
|
|
|
|
project.ext.set("isAndroidSDKAvailable", true)
|
|
|
|
} else {
|
|
|
|
project.ext.set("isAndroidSDKAvailable", false)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
allprojects {
|
|
|
|
group = "net.mamoe"
|
2020-03-24 17:32:22 +08:00
|
|
|
version = Versions.Mirai.version
|
2020-03-01 13:00:34 +08:00
|
|
|
|
|
|
|
repositories {
|
2020-03-07 22:23:10 +08:00
|
|
|
maven(url = "https://mirrors.huaweicloud.com/repository/maven")
|
2020-03-24 10:01:03 +08:00
|
|
|
maven(url = "https://dl.bintray.com/kotlin/kotlin-eap")
|
2020-03-01 13:00:34 +08:00
|
|
|
jcenter()
|
|
|
|
google()
|
|
|
|
}
|
|
|
|
}
|