mirror of
https://github.com/mamoe/mirai.git
synced 2025-04-17 09:09:23 +08:00
Create new module mirai-core-utils-addition
This commit is contained in:
parent
1a2241b8b2
commit
62319ff453
mirai-console
backend/mirai-console/src/internal/plugin
tools/gradle-plugin/src/main/kotlin
mirai-core-utils-addition
mirai-core
settings.gradle.kts@ -71,6 +71,9 @@ internal class JvmPluginDependencyDownloader(
|
||||
"mirai-core-utils",
|
||||
"mirai-core-utils-jvm",
|
||||
"mirai-core-utils-android",
|
||||
"mirai-core-utils-addition",
|
||||
"mirai-core-utils-addition-jvm",
|
||||
"mirai-core-utils-addition-android",
|
||||
"mirai-console",
|
||||
"mirai-console-terminal",
|
||||
)
|
||||
|
@ -57,6 +57,9 @@ public open class BuildMiraiPluginV2 : Jar() {
|
||||
"net.mamoe:mirai-core-utils",
|
||||
"net.mamoe:mirai-core-utils-jvm",
|
||||
"net.mamoe:mirai-core-utils-android",
|
||||
"net.mamoe:mirai-core-utils-addition",
|
||||
"net.mamoe:mirai-core-utils-addition-jvm",
|
||||
"net.mamoe:mirai-core-utils-addition-android",
|
||||
"net.mamoe:mirai-console",
|
||||
"net.mamoe:mirai-console-terminal",
|
||||
)
|
||||
|
77
mirai-core-utils-addition/build.gradle.kts
Normal file
77
mirai-core-utils-addition/build.gradle.kts
Normal file
@ -0,0 +1,77 @@
|
||||
/*
|
||||
* Copyright 2019-2022 Mamoe Technologies and contributors.
|
||||
*
|
||||
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
|
||||
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
|
||||
*
|
||||
* https://github.com/mamoe/mirai/blob/dev/LICENSE
|
||||
*/
|
||||
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
// id("kotlinx-atomicfu")
|
||||
kotlin("plugin.serialization")
|
||||
id("me.him188.kotlin-jvm-blocking-bridge")
|
||||
id("me.him188.kotlin-dynamic-delegation")
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
description = "mirai-core utilities additions"
|
||||
|
||||
kotlin {
|
||||
explicitApi()
|
||||
|
||||
if (isAndroidSDKAvailable) {
|
||||
jvm("android") {
|
||||
attributes.attribute(KotlinPlatformType.attribute, KotlinPlatformType.androidJvm)
|
||||
// publishAllLibraryVariants()
|
||||
}
|
||||
} else {
|
||||
printAndroidNotInstalled()
|
||||
}
|
||||
|
||||
jvm("common") {
|
||||
attributes.attribute(KotlinPlatformType.attribute, KotlinPlatformType.common)
|
||||
}
|
||||
|
||||
jvm("jvm")
|
||||
|
||||
sourceSets {
|
||||
val commonMain by getting {
|
||||
dependencies {
|
||||
implementation(project(":mirai-core-utils"))
|
||||
}
|
||||
}
|
||||
|
||||
val commonTest by getting {
|
||||
dependencies {
|
||||
}
|
||||
}
|
||||
|
||||
if (isAndroidSDKAvailable) {
|
||||
val androidMain by getting {
|
||||
dependencies {
|
||||
compileOnly(`android-runtime`)
|
||||
implementation(`zxing-core`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val jvmMain by getting {
|
||||
dependencies {
|
||||
implementation(`zxing-javase`)
|
||||
}
|
||||
}
|
||||
|
||||
val jvmTest by getting {
|
||||
dependencies {
|
||||
runtimeOnly(files("build/classes/kotlin/jvm/test")) // classpath is not properly set by IDE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configureMppPublishing()
|
||||
|
10
mirai-core-utils-addition/src/androidMain/kotlin/package.kt
Normal file
10
mirai-core-utils-addition/src/androidMain/kotlin/package.kt
Normal file
@ -0,0 +1,10 @@
|
||||
/*
|
||||
* Copyright 2019-2022 Mamoe Technologies and contributors.
|
||||
*
|
||||
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
|
||||
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
|
||||
*
|
||||
* https://github.com/mamoe/mirai/blob/dev/LICENSE
|
||||
*/
|
||||
|
||||
package net.mamoe.mirai.utils.addition
|
10
mirai-core-utils-addition/src/commonMain/kotlin/package.kt
Normal file
10
mirai-core-utils-addition/src/commonMain/kotlin/package.kt
Normal file
@ -0,0 +1,10 @@
|
||||
/*
|
||||
* Copyright 2019-2022 Mamoe Technologies and contributors.
|
||||
*
|
||||
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
|
||||
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
|
||||
*
|
||||
* https://github.com/mamoe/mirai/blob/dev/LICENSE
|
||||
*/
|
||||
|
||||
package net.mamoe.mirai.utils.addition
|
10
mirai-core-utils-addition/src/jvmMain/kotlin/package.kt
Normal file
10
mirai-core-utils-addition/src/jvmMain/kotlin/package.kt
Normal file
@ -0,0 +1,10 @@
|
||||
/*
|
||||
* Copyright 2019-2022 Mamoe Technologies and contributors.
|
||||
*
|
||||
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
|
||||
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
|
||||
*
|
||||
* https://github.com/mamoe/mirai/blob/dev/LICENSE
|
||||
*/
|
||||
|
||||
package net.mamoe.mirai.utils.addition
|
@ -102,6 +102,7 @@ kotlin {
|
||||
val jvmTest by getting {
|
||||
dependencies {
|
||||
api(`kotlinx-coroutines-debug`)
|
||||
api(project(":mirai-core-utils-addition"))
|
||||
// implementation("net.mamoe:mirai-login-solver-selenium:1.0-dev-14")
|
||||
}
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ fun includeProject(projectPath: String, dir: String? = null) {
|
||||
}
|
||||
|
||||
includeProject(":mirai-core-utils")
|
||||
includeProject(":mirai-core-utils-addition")
|
||||
includeProject(":mirai-core-api")
|
||||
includeProject(":mirai-core")
|
||||
includeProject(":mirai-core-all")
|
||||
|
Loading…
Reference in New Issue
Block a user