Skip to content

Commit

Permalink
更新simbot到RC3, 更新部分插件版本, 清理部分代码或TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
ForteScarlet committed Jun 9, 2024
1 parent cfc511f commit bc73faf
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
gradle-version: 8.5
arguments: |
publishToSonatype
closeAndReleaseStagingRepository
closeAndReleaseStagingRepositories
--info
--warning-mode all
-x test
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
gradle-version: 8.5
arguments: |
publishToSonatype
closeAndReleaseStagingRepository
closeAndReleaseStagingRepositories
--info
--warning-mode all
-x test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
arguments: |
test
publishToSonatype
closeAndReleaseStagingRepository
closeAndReleaseStagingRepositories
--info
--warning-mode all
-Porg.gradle.jvmargs="-Xmx8g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-v4-release.yml.bk
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
gradle-version: 8.5
arguments: |
publishToSonatype
closeAndReleaseStagingRepository
closeAndReleaseStagingRepositories
--info
--warning-mode all
-x test
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
gradle-version: 8.5
arguments: |
publishToSonatype
closeAndReleaseStagingRepository
closeAndReleaseStagingRepositories
--info
--warning-mode all
-x test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-v4-snapshot.yml.bk
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
arguments: |
test
publishToSonatype
closeAndReleaseStagingRepository
closeAndReleaseStagingRepositories
--info
--warning-mode all
-Porg.gradle.jvmargs="-Xmx8g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,5 @@ fabric.properties
.idea/caches/build_file_checksums.ser

generated-docs

.kotlin
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies {
implementation(libs.bundles.dokka)

// see https://github.com/gradle-nexus/publish-plugin
implementation("io.github.gradle-nexus:publish-plugin:1.1.0")
implementation("io.github.gradle-nexus:publish-plugin:2.0.0")

// simbot suspend transform gradle common
implementation(libs.simbot.gradle)
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ ktor = "2.3.8"
openjdk-jmh = "1.37"
log4j = "2.23.1"
# simbot
simbot = "4.0.0-RC2"
simbot = "4.0.0-RC3"
suspendTransform = "0.8.0-beta1"
gradleCommon = "0.3.0"
gradleCommon = "0.4.0"
# ksp
ksp = "2.0.0-1.0.22"
# https://square.github.io/kotlinpoet/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,5 +269,3 @@ public abstract class QGForumPublishAuditResultEvent : QGForumEvent() {
override fun toString(): String =
"QGForumPublishAuditResultEvent(sourceEventEntity=$sourceEventEntity)"
}

// TODO Open forum event?
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ package love.forte.simbot.component.qguild.internal.bot

import kotlinx.coroutines.Job
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch
import love.forte.simbot.bot.ConflictBotException
import love.forte.simbot.bot.JobBasedBotManager
import love.forte.simbot.bot.NoSuchBotException
Expand All @@ -35,7 +37,9 @@ import love.forte.simbot.component.qguild.bot.QGBot
import love.forte.simbot.component.qguild.bot.QQGuildBotManager
import love.forte.simbot.component.qguild.bot.QQGuildBotManagerConfiguration
import love.forte.simbot.component.qguild.bot.config.QGBotComponentConfiguration
import love.forte.simbot.component.qguild.internal.event.QGBotRegisteredEventImpl
import love.forte.simbot.event.EventDispatcher
import love.forte.simbot.event.onEachError
import love.forte.simbot.logger.Logger
import love.forte.simbot.logger.LoggerFactory
import love.forte.simbot.logger.logger
Expand Down Expand Up @@ -154,13 +158,20 @@ internal class QQGuildBotManagerImpl(

bots.add(newBot)

onCompletion {
newBot.onCompletion {
// remove self on completion
bots.remove(newBot)
}

// TODO
// eventProcessor.pushAndLaunch(newBot, QGBotRegisteredEventImpl(bot))
newBot.launch {
val event = QGBotRegisteredEventImpl(newBot)
eventDispatcher
.push(event)
.onEachError { e ->
logger.error("Event {} process failed: {}", event, e, e.content)
}
.collect()
}

return newBot
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ import love.forte.simbot.message.OfflineImage
* @see Image
* @suppress TODO
*/
public class QGOfflineImage // TODO
internal class QGOfflineImage // TODO

/**
* 收到的图片类型
* @see OfflineImage
* @suppress TODO
*/
public class QGImage // TODO
internal class QGImage // TODO

0 comments on commit bc73faf

Please sign in to comment.