From 673c8d2a9637af25ab6fb7dbebb339f56ffce537 Mon Sep 17 00:00:00 2001 From: Him188 Date: Wed, 1 Jan 2020 18:15:54 +0800 Subject: [PATCH] Add classpath dependency due to kotlin bug --- mirai-core-qqandroid/build.gradle.kts | 4 +++- .../kotlin/net/mamoe/mirai/qqandroid/QQAndroidBot.kt | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mirai-core-qqandroid/build.gradle.kts b/mirai-core-qqandroid/build.gradle.kts index 859a9c322..6b2d387d7 100644 --- a/mirai-core-qqandroid/build.gradle.kts +++ b/mirai-core-qqandroid/build.gradle.kts @@ -96,6 +96,7 @@ kotlin { val jvmMain by getting { dependencies { + runtimeOnly(files("build/classes/kotlin/jvm/main")) // classpath is not properly set by IDE } } @@ -105,7 +106,8 @@ kotlin { api(kotlin("test-junit", kotlinVersion)) implementation("org.pcap4j:pcap4j-distribution:1.8.2") - //runtimeOnly(files("build/classes/kotlin/jvm/test")) // classpath is not properly set by IDE + runtimeOnly(files("build/classes/kotlin/jvm/main")) // classpath is not properly set by IDE + runtimeOnly(files("build/classes/kotlin/jvm/test")) // classpath is not properly set by IDE } } } diff --git a/mirai-core-qqandroid/src/androidMain/kotlin/net/mamoe/mirai/qqandroid/QQAndroidBot.kt b/mirai-core-qqandroid/src/androidMain/kotlin/net/mamoe/mirai/qqandroid/QQAndroidBot.kt index def004a30..f16e42d91 100644 --- a/mirai-core-qqandroid/src/androidMain/kotlin/net/mamoe/mirai/qqandroid/QQAndroidBot.kt +++ b/mirai-core-qqandroid/src/androidMain/kotlin/net/mamoe/mirai/qqandroid/QQAndroidBot.kt @@ -1,9 +1,11 @@ package net.mamoe.mirai.qqandroid import net.mamoe.mirai.BotAccount +import net.mamoe.mirai.qqandroid.utils.Context import net.mamoe.mirai.utils.BotConfiguration internal actual class QQAndroidBot actual constructor( + context: Context, account: BotAccount, configuration: BotConfiguration -) : QQAndroidBotBase(account, configuration) \ No newline at end of file +) : QQAndroidBotBase(context, account, configuration) \ No newline at end of file