Skip to content

Commit e746ac1

Browse files
authored
Merge pull request #177 from simple-robot/dev/optimize-suspend-hidden
隐藏部分未隐藏的挂起函数;调整Opt注释依赖的传播方式
2 parents 0f77c57 + 134ea59 commit e746ac1

File tree

5 files changed

+6
-27
lines changed

5 files changed

+6
-27
lines changed

simbot-component-kook-api/build.gradle.kts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ kotlin {
7272
api(libs.simbot.common.apidefinition)
7373
api(libs.simbot.common.suspend)
7474
api(libs.simbot.common.core)
75-
compileOnly(libs.simbot.common.annotations)
75+
api(libs.simbot.common.annotations)
7676

7777
api(libs.ktor.client.core)
7878
api(libs.ktor.client.contentNegotiation)
@@ -93,18 +93,11 @@ kotlin {
9393
implementation(libs.log4j.api)
9494
implementation(libs.log4j.core)
9595
implementation(libs.log4j.slf4j2Impl)
96-
// implementation(libs.kotlinx.coroutines.reactor)
97-
// implementation(libs.reactor.core)
9896
}
9997
}
10098

10199
jsMain.dependencies {
102100
api(libs.ktor.client.js)
103-
implementation(libs.simbot.common.annotations)
104-
}
105-
106-
nativeMain.dependencies {
107-
implementation(libs.simbot.common.annotations)
108101
}
109102

110103
mingwTest.dependencies {

simbot-component-kook-core/build.gradle.kts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ kotlin {
6565
commonMain.dependencies {
6666
compileOnly(libs.simbot.api)
6767
api(project(":simbot-component-kook-stdlib"))
68-
compileOnly(libs.simbot.common.annotations)
68+
api(libs.simbot.common.annotations)
6969
// ktor
7070
api(libs.ktor.client.contentNegotiation)
7171
// api(libs.ktor.serialization.kotlinx.json)
@@ -84,20 +84,15 @@ kotlin {
8484

8585
jvmTest.dependencies {
8686
implementation(libs.ktor.client.java)
87-
8887
implementation(libs.simbot.logger.slf4jimpl)
89-
// implementation(libs.log4j.core)
90-
// implementation(libs.log4j.slf4j2Impl)
9188
}
9289

9390
jsMain.dependencies {
9491
implementation(libs.simbot.api)
95-
api(libs.simbot.common.annotations)
9692
}
9793

9894
nativeMain.dependencies {
9995
implementation(libs.simbot.api)
100-
api(libs.simbot.common.annotations)
10196
}
10297

10398
mingwTest.dependencies {

simbot-component-kook-core/src/commonMain/kotlin/love/forte/simbot/component/kook/message/KookChannelMessageDetailsContent.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ public data class KookChannelMessageDetailsContent internal constructor(
100100
return details.quote?.asMessage()
101101
}
102102

103+
@JvmSynthetic
103104
override suspend fun referenceMessage(): KookMessageContent? {
104105
val quote = details.quote ?: return null
105106
val view = GetChannelMessageViewApi.create(quote.id).requestDataBy(bot)
@@ -113,6 +114,7 @@ public data class KookChannelMessageDetailsContent internal constructor(
113114
* 会抛出请求 [DeleteChannelMessageApi] 过程中可能出现的任何异常。
114115
*
115116
*/
117+
@JvmSynthetic
116118
override suspend fun delete(vararg options: DeleteOption) {
117119
val stdOpts = options.standardAnalysis()
118120
val result = try {

simbot-component-kook-core/src/commonMain/kotlin/love/forte/simbot/component/kook/message/KookReceiveMessageContent.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ public class KookReceiveMessageContent internal constructor(
262262
}
263263
}
264264

265+
@JvmSynthetic
265266
override suspend fun referenceMessage(): KookMessageContent? {
266267
return if (isDirect) {
267268
val ref = referenceFromDirect(bot, source.msgId, source.authorId) ?: return null

simbot-component-kook-stdlib/build.gradle.kts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ kotlin {
6666

6767
sourceSets {
6868
commonMain.dependencies {
69-
compileOnly(libs.simbot.common.annotations)
69+
api(libs.simbot.common.annotations)
7070
api(project(":simbot-component-kook-api"))
7171
api(libs.simbot.common.loop)
7272
api(libs.simbot.common.atomic)
@@ -85,20 +85,8 @@ kotlin {
8585
implementation(libs.simbot.logger.slf4jimpl)
8686
}
8787

88-
// jvmTest.dependencies {
89-
// implementation(libs.ktor.client.cio)
90-
// implementation(simbotApi)
91-
// implementation(simbotLogger)
92-
// implementation(simbotLoggerSlf4j)
93-
// }
94-
9588
jsMain.dependencies {
9689
api(libs.ktor.client.js)
97-
implementation(libs.simbot.common.annotations)
98-
}
99-
100-
nativeMain.dependencies {
101-
implementation(libs.simbot.common.annotations)
10290
}
10391

10492
mingwTest.dependencies {

0 commit comments

Comments
 (0)