mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-23 22:30:47 +08:00
Fix NPE
This commit is contained in:
parent
27819d7343
commit
b9e00f4169
@ -30,8 +30,9 @@ fun ktor(id: String, version: String) = "io.ktor:ktor-$id:$version"
|
|||||||
description = "QQ protocol library"
|
description = "QQ protocol library"
|
||||||
version = rootProject.ext.get("mirai_version")!!.toString()
|
version = rootProject.ext.get("mirai_version")!!.toString()
|
||||||
|
|
||||||
kotlin {
|
|
||||||
val isAndroidSDKAvailable: Boolean by project
|
val isAndroidSDKAvailable: Boolean by project
|
||||||
|
|
||||||
|
kotlin {
|
||||||
if (isAndroidSDKAvailable) {
|
if (isAndroidSDKAvailable) {
|
||||||
android("android") {
|
android("android") {
|
||||||
publishAllLibraryVariants()
|
publishAllLibraryVariants()
|
||||||
@ -96,6 +97,7 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isAndroidSDKAvailable) {
|
||||||
val androidMain by getting {
|
val androidMain by getting {
|
||||||
dependencies {
|
dependencies {
|
||||||
}
|
}
|
||||||
@ -109,6 +111,7 @@ kotlin {
|
|||||||
api(kotlin("test-common"))
|
api(kotlin("test-common"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
val jvmMain by getting {
|
val jvmMain by getting {
|
||||||
dependencies {
|
dependencies {
|
||||||
|
@ -30,8 +30,9 @@ fun ktor(id: String, version: String) = "io.ktor:ktor-$id:$version"
|
|||||||
description = "QQ protocol library"
|
description = "QQ protocol library"
|
||||||
version = rootProject.ext.get("mirai_version")!!.toString()
|
version = rootProject.ext.get("mirai_version")!!.toString()
|
||||||
|
|
||||||
kotlin {
|
|
||||||
val isAndroidSDKAvailable: Boolean by project
|
val isAndroidSDKAvailable: Boolean by project
|
||||||
|
|
||||||
|
kotlin {
|
||||||
if (isAndroidSDKAvailable) {
|
if (isAndroidSDKAvailable) {
|
||||||
android("android") {
|
android("android") {
|
||||||
publishAllLibraryVariants()
|
publishAllLibraryVariants()
|
||||||
@ -95,6 +96,7 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isAndroidSDKAvailable) {
|
||||||
val androidMain by getting {
|
val androidMain by getting {
|
||||||
dependencies {
|
dependencies {
|
||||||
}
|
}
|
||||||
@ -108,6 +110,7 @@ kotlin {
|
|||||||
api(kotlin("test-common"))
|
api(kotlin("test-common"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
val jvmMain by getting {
|
val jvmMain by getting {
|
||||||
dependencies {
|
dependencies {
|
||||||
|
@ -29,8 +29,9 @@ fun ktor(id: String, version: String) = "io.ktor:ktor-$id:$version"
|
|||||||
|
|
||||||
description = "QQ protocol library"
|
description = "QQ protocol library"
|
||||||
|
|
||||||
kotlin {
|
|
||||||
val isAndroidSDKAvailable: Boolean by project
|
val isAndroidSDKAvailable: Boolean by project
|
||||||
|
|
||||||
|
kotlin {
|
||||||
if (isAndroidSDKAvailable) {
|
if (isAndroidSDKAvailable) {
|
||||||
android("android") {
|
android("android") {
|
||||||
publishAllLibraryVariants()
|
publishAllLibraryVariants()
|
||||||
@ -108,6 +109,7 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isAndroidSDKAvailable) {
|
||||||
val androidMain by getting {
|
val androidMain by getting {
|
||||||
dependencies {
|
dependencies {
|
||||||
api(kotlin("reflect", kotlinVersion))
|
api(kotlin("reflect", kotlinVersion))
|
||||||
@ -127,6 +129,7 @@ kotlin {
|
|||||||
api(kotlin("test-common"))
|
api(kotlin("test-common"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
val jvmMain by getting {
|
val jvmMain by getting {
|
||||||
dependencies {
|
dependencies {
|
||||||
|
Loading…
Reference in New Issue
Block a user