mirai/build.gradle.kts
2020-03-24 10:01:03 +08:00

47 lines
1.4 KiB
Plaintext

import java.lang.System.getProperty
import java.util.*
buildscript {
repositories {
mavenLocal()
maven(url = "https://mirrors.huaweicloud.com/repository/maven")
maven(url = "https://dl.bintray.com/kotlin/kotlin-eap")
jcenter()
google()
}
dependencies {
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}")
}
}
plugins {
id("org.jetbrains.dokka") version Versions.Kotlin.dokka apply false
id("com.jfrog.bintray") version Versions.Publishing.bintray apply false
}
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"
version = getProperty("miraiVersion")
repositories {
maven(url = "https://mirrors.huaweicloud.com/repository/maven")
maven(url = "https://dl.bintray.com/kotlin/kotlin-eap")
jcenter()
google()
}
}