Skip to content

Commit

Permalink
Merge pull request #177 from simple-robot/dev/optimize-suspend-hidden
Browse files Browse the repository at this point in the history
隐藏部分未隐藏的挂起函数;调整Opt注释依赖的传播方式
  • Loading branch information
ForteScarlet authored Aug 29, 2024
2 parents 0f77c57 + 134ea59 commit e746ac1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 27 deletions.
9 changes: 1 addition & 8 deletions simbot-component-kook-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ kotlin {
api(libs.simbot.common.apidefinition)
api(libs.simbot.common.suspend)
api(libs.simbot.common.core)
compileOnly(libs.simbot.common.annotations)
api(libs.simbot.common.annotations)

api(libs.ktor.client.core)
api(libs.ktor.client.contentNegotiation)
Expand All @@ -93,18 +93,11 @@ kotlin {
implementation(libs.log4j.api)
implementation(libs.log4j.core)
implementation(libs.log4j.slf4j2Impl)
// implementation(libs.kotlinx.coroutines.reactor)
// implementation(libs.reactor.core)
}
}

jsMain.dependencies {
api(libs.ktor.client.js)
implementation(libs.simbot.common.annotations)
}

nativeMain.dependencies {
implementation(libs.simbot.common.annotations)
}

mingwTest.dependencies {
Expand Down
7 changes: 1 addition & 6 deletions simbot-component-kook-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ kotlin {
commonMain.dependencies {
compileOnly(libs.simbot.api)
api(project(":simbot-component-kook-stdlib"))
compileOnly(libs.simbot.common.annotations)
api(libs.simbot.common.annotations)
// ktor
api(libs.ktor.client.contentNegotiation)
// api(libs.ktor.serialization.kotlinx.json)
Expand All @@ -84,20 +84,15 @@ kotlin {

jvmTest.dependencies {
implementation(libs.ktor.client.java)

implementation(libs.simbot.logger.slf4jimpl)
// implementation(libs.log4j.core)
// implementation(libs.log4j.slf4j2Impl)
}

jsMain.dependencies {
implementation(libs.simbot.api)
api(libs.simbot.common.annotations)
}

nativeMain.dependencies {
implementation(libs.simbot.api)
api(libs.simbot.common.annotations)
}

mingwTest.dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public data class KookChannelMessageDetailsContent internal constructor(
return details.quote?.asMessage()
}

@JvmSynthetic
override suspend fun referenceMessage(): KookMessageContent? {
val quote = details.quote ?: return null
val view = GetChannelMessageViewApi.create(quote.id).requestDataBy(bot)
Expand All @@ -113,6 +114,7 @@ public data class KookChannelMessageDetailsContent internal constructor(
* 会抛出请求 [DeleteChannelMessageApi] 过程中可能出现的任何异常。
*
*/
@JvmSynthetic
override suspend fun delete(vararg options: DeleteOption) {
val stdOpts = options.standardAnalysis()
val result = try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ public class KookReceiveMessageContent internal constructor(
}
}

@JvmSynthetic
override suspend fun referenceMessage(): KookMessageContent? {
return if (isDirect) {
val ref = referenceFromDirect(bot, source.msgId, source.authorId) ?: return null
Expand Down
14 changes: 1 addition & 13 deletions simbot-component-kook-stdlib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ kotlin {

sourceSets {
commonMain.dependencies {
compileOnly(libs.simbot.common.annotations)
api(libs.simbot.common.annotations)
api(project(":simbot-component-kook-api"))
api(libs.simbot.common.loop)
api(libs.simbot.common.atomic)
Expand All @@ -85,20 +85,8 @@ kotlin {
implementation(libs.simbot.logger.slf4jimpl)
}

// jvmTest.dependencies {
// implementation(libs.ktor.client.cio)
// implementation(simbotApi)
// implementation(simbotLogger)
// implementation(simbotLoggerSlf4j)
// }

jsMain.dependencies {
api(libs.ktor.client.js)
implementation(libs.simbot.common.annotations)
}

nativeMain.dependencies {
implementation(libs.simbot.common.annotations)
}

mingwTest.dependencies {
Expand Down

0 comments on commit e746ac1

Please sign in to comment.