From a5d25c03d1e8c1a3b58ffcaeb4bae434f6871359 Mon Sep 17 00:00:00 2001 From: Him188 Date: Mon, 30 Mar 2020 17:27:44 +0800 Subject: [PATCH 1/2] Remove mirai-core dependencies --- mirai-console-graphical/build.gradle.kts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/mirai-console-graphical/build.gradle.kts b/mirai-console-graphical/build.gradle.kts index 9acfc7f3d..63e3c4f06 100644 --- a/mirai-console-graphical/build.gradle.kts +++ b/mirai-console-graphical/build.gradle.kts @@ -1,4 +1,3 @@ -import Versions.Publishing.bintray import java.util.* plugins { @@ -65,16 +64,13 @@ fun kotlinx(id: String, version: String) = "org.jetbrains.kotlinx:kotlinx-$id:$v fun ktor(id: String, version: String) = "io.ktor:ktor-$id:$version" -val miraiVersion = Versions.Mirai.core - dependencies { - implementation("net.mamoe:mirai-core-jvm:$miraiVersion") - implementation("net.mamoe:mirai-core-qqandroid-jvm:$miraiVersion") - api(project(":mirai-console")) + compileOnly(project(":mirai-console")) api(group = "no.tornado", name = "tornadofx", version = "1.7.19") api(group = "com.jfoenix", name = "jfoenix", version = "9.0.8") + testApi(project(":mirai-console")) testApi(group = "org.yaml", name = "snakeyaml", version = "1.25") } From b7dc52b2d300ed76db8a463c0afe541076594904 Mon Sep 17 00:00:00 2001 From: Him188 Date: Mon, 30 Mar 2020 17:37:07 +0800 Subject: [PATCH 2/2] Adjust dependencies --- mirai-console-graphical/build.gradle.kts | 1 + mirai-console-terminal/build.gradle.kts | 23 +---------------------- mirai-console/build.gradle.kts | 19 ++++++++----------- 3 files changed, 10 insertions(+), 33 deletions(-) diff --git a/mirai-console-graphical/build.gradle.kts b/mirai-console-graphical/build.gradle.kts index 63e3c4f06..a10af4843 100644 --- a/mirai-console-graphical/build.gradle.kts +++ b/mirai-console-graphical/build.gradle.kts @@ -65,6 +65,7 @@ fun kotlinx(id: String, version: String) = "org.jetbrains.kotlinx:kotlinx-$id:$v fun ktor(id: String, version: String) = "io.ktor:ktor-$id:$version" dependencies { + compileOnly("net.mamoe:mirai-core-jvm:${Versions.Mirai.core}") compileOnly(project(":mirai-console")) api(group = "no.tornado", name = "tornadofx", version = "1.7.19") diff --git a/mirai-console-terminal/build.gradle.kts b/mirai-console-terminal/build.gradle.kts index 87777c0c0..0e334fffe 100644 --- a/mirai-console-terminal/build.gradle.kts +++ b/mirai-console-terminal/build.gradle.kts @@ -14,29 +14,8 @@ tasks.withType() { attributes["Main-Class"] = "net.mamoe.mirai.console.MiraiConsoleTerminalLoader" } } - -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" - - -val miraiVersion = Versions.Mirai.core - dependencies { - implementation("net.mamoe:mirai-core-jvm:$miraiVersion") - implementation("net.mamoe:mirai-core-qqandroid-jvm:$miraiVersion") + api("net.mamoe:mirai-core-qqandroid-jvm:${Versions.Mirai.core}") api(project(":mirai-console")) - api(group = "com.googlecode.lanterna", name = "lanterna", version = "3.0.2") } \ No newline at end of file diff --git a/mirai-console/build.gradle.kts b/mirai-console/build.gradle.kts index 87034510b..8e301d2a3 100644 --- a/mirai-console/build.gradle.kts +++ b/mirai-console/build.gradle.kts @@ -1,5 +1,5 @@ -import java.util.* import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import java.util.* plugins { kotlin("jvm") @@ -23,18 +23,15 @@ kotlin { } dependencies { compileOnly("net.mamoe:mirai-core-jvm:${Versions.Mirai.core}") - compileOnly("net.mamoe:mirai-core-qqandroid-jvm:${Versions.Mirai.core}") + compileOnly(kotlin("stdlib")) // embedded by core + + api("com.google.code.gson:gson:2.8.6") + api(group = "org.yaml", name = "snakeyaml", version = "1.25") + api(group = "com.moandjiezana.toml", name = "toml4j", version = "0.7.2") - implementation("com.google.code.gson:gson:2.8.6") - implementation(group = "org.yaml", name = "snakeyaml", version = "1.25") - implementation(group = "com.moandjiezana.toml", name = "toml4j", version = "0.7.2") - implementation(kotlin("stdlib-jdk8")) - - - testApi(ktor("client-cio", Versions.Kotlin.ktor)) - testApi(ktor("client-core", Versions.Kotlin.ktor)) - testApi(ktor("network", Versions.Kotlin.ktor)) + testApi("net.mamoe:mirai-core-qqandroid-jvm:${Versions.Mirai.core}") + testApi(kotlin("stdlib")) testApi("org.jsoup:jsoup:1.12.1") }