mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-06 01:07:24 +08:00
new module
This commit is contained in:
parent
9058efe41e
commit
98bea5a845
6
mirai-console-graphical/README.md
Normal file
6
mirai-console-graphical/README.md
Normal file
@ -0,0 +1,6 @@
|
||||
### Mirai Console Graphical
|
||||
支持windows/mac
|
||||
有正式UI界面实现的CONSOLE
|
||||
优点: 适合新手/完全不懂编程的/界面美丽
|
||||
缺点: 不能在linux服务器运行
|
||||
所使用插件系统与terminal版本一致 可以来回切换
|
34
mirai-console-graphical/build.gradle.kts
Normal file
34
mirai-console-graphical/build.gradle.kts
Normal file
@ -0,0 +1,34 @@
|
||||
plugins {
|
||||
id("kotlinx-serialization")
|
||||
id("kotlin")
|
||||
id("java")
|
||||
}
|
||||
|
||||
|
||||
apply(plugin = "com.github.johnrengelman.shadow")
|
||||
|
||||
val kotlinVersion: String by rootProject.ext
|
||||
val atomicFuVersion: String by rootProject.ext
|
||||
val coroutinesVersion: String by rootProject.ext
|
||||
val kotlinXIoVersion: String by rootProject.ext
|
||||
val coroutinesIoVersion: String by rootProject.ext
|
||||
|
||||
val klockVersion: String by rootProject.ext
|
||||
val ktorVersion: String by rootProject.ext
|
||||
|
||||
val serializationVersion: String by rootProject.ext
|
||||
|
||||
fun kotlinx(id: String, version: String) = "org.jetbrains.kotlinx:kotlinx-$id:$version"
|
||||
|
||||
fun ktor(id: String, version: String) = "io.ktor:ktor-$id:$version"
|
||||
|
||||
dependencies {
|
||||
api(project(":mirai-core"))
|
||||
api(project(":mirai-core-qqandroid"))
|
||||
api(project(":mirai-api-http"))
|
||||
api(project(":mirai-console"))
|
||||
runtimeOnly(files("../mirai-core-qqandroid/build/classes/kotlin/jvm/main"))
|
||||
api(group = "no.tornado", name = "tornadofx", version = "1.7.17")
|
||||
api("org.bouncycastle:bcprov-jdk15on:1.64")
|
||||
// classpath is not set correctly by IDE
|
||||
}
|
6
mirai-console-terminal/README.md
Normal file
6
mirai-console-terminal/README.md
Normal file
@ -0,0 +1,6 @@
|
||||
### Mirai Console Terminal
|
||||
支持windows/mac/linux
|
||||
在terminal环境下的Console, 由控制台富文本实现简易UI
|
||||
优点: 可以在linux环境下运行/简洁使用效率高
|
||||
缺点: 需要有略微的terminal知识
|
||||
所使用插件系统与graphical版本一致 可以来回切换
|
41
mirai-console-terminal/build.gradle.kts
Normal file
41
mirai-console-terminal/build.gradle.kts
Normal file
@ -0,0 +1,41 @@
|
||||
plugins {
|
||||
id("kotlinx-serialization")
|
||||
id("kotlin")
|
||||
id("java")
|
||||
}
|
||||
|
||||
|
||||
apply(plugin = "com.github.johnrengelman.shadow")
|
||||
|
||||
|
||||
val kotlinVersion: String by rootProject.ext
|
||||
val atomicFuVersion: String by rootProject.ext
|
||||
val coroutinesVersion: String by rootProject.ext
|
||||
val kotlinXIoVersion: String by rootProject.ext
|
||||
val coroutinesIoVersion: String by rootProject.ext
|
||||
|
||||
val klockVersion: String by rootProject.ext
|
||||
val ktorVersion: String by rootProject.ext
|
||||
|
||||
val serializationVersion: String by rootProject.ext
|
||||
|
||||
fun kotlinx(id: String, version: String) = "org.jetbrains.kotlinx:kotlinx-$id:$version"
|
||||
|
||||
fun ktor(id: String, version: String) = "io.ktor:ktor-$id:$version"
|
||||
|
||||
|
||||
|
||||
dependencies {
|
||||
api(project(":mirai-core"))
|
||||
api(project(":mirai-core-qqandroid"))
|
||||
api(project(":mirai-api-http"))
|
||||
runtimeOnly(files("../mirai-core-qqandroid/build/classes/kotlin/jvm/main"))
|
||||
runtimeOnly(files("../mirai-core/build/classes/kotlin/jvm/main"))
|
||||
api(kotlin("serialization"))
|
||||
api(group = "com.alibaba", name = "fastjson", version = "1.2.62")
|
||||
api(group = "org.yaml", name = "snakeyaml", version = "1.25")
|
||||
api(group = "com.moandjiezana.toml", name = "toml4j", version = "0.7.2")
|
||||
api(group = "com.googlecode.lanterna", name = "lanterna", version = "3.0.2")
|
||||
api("org.bouncycastle:bcprov-jdk15on:1.64")
|
||||
// classpath is not set correctly by IDE
|
||||
}
|
@ -42,7 +42,7 @@ actual fun ECDH() = ECDH(ECDH.generateKeyPair())
|
||||
|
||||
actual class ECDH actual constructor(actual val keyPair: ECDHKeyPair) {
|
||||
actual companion object {
|
||||
private var isECDHAvailable = false
|
||||
private var isECDHAvailable = true
|
||||
init {
|
||||
if (kotlin.runCatching {
|
||||
Security.addProvider(BouncyCastleProvider())
|
||||
|
Loading…
Reference in New Issue
Block a user