Skip to content

Commit

Permalink
Merge pull request #921 from simple-robot/v4-dev
Browse files Browse the repository at this point in the history
release: v4.6.0
  • Loading branch information
ForteScarlet authored Aug 14, 2024
2 parents 59acbce + 3d9fdad commit 61361be
Show file tree
Hide file tree
Showing 29 changed files with 695 additions and 96 deletions.
Empty file added .changelog/v4.6.0.md
Empty file.
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ updates:
target-branch: "v4-dev"
schedule:
interval: daily
assignees:
- ForteScarlet
open-pull-requests-limit: 10
1 change: 1 addition & 0 deletions .github/workflows/qodana_code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

jobs:
qodana:
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down
31 changes: 22 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# v4.6.0

> Release & Pull Notes: [v4.6.0](https://github.com/simple-robot/simpler-robot/releases/tag/v4.6.0)
- build(deps): bump io.projectreactor:reactor-core from 3.6.2 to 3.6.9 ([`99fd7c6f2`](https://github.com/simple-robot/simpler-robot/commit/99fd7c6f2))
- build(deps): bump io.projectreactor:reactor-test from 3.6.2 to 3.6.9 ([`615689775`](https://github.com/simple-robot/simpler-robot/commit/615689775))
- feat: 新增一个新的组 love.forte.simbot.processor, 以及其中一个新的用于组件开发的ksp处理器 simbot-processor-message-element-polymorphic-include ([`4adc9412a`](https://github.com/simple-robot/simpler-robot/commit/4adc9412a))
- build(deps): bump slf4j from 2.0.15 to 2.0.16 ([`1d478c4eb`](https://github.com/simple-robot/simpler-robot/commit/1d478c4eb))
- feat(api): 为 `Bot` 增加用于根据ID获取源消息的API ([`25ba84656`](https://github.com/simple-robot/simpler-robot/commit/25ba84656))
- feat(api): 为 `MessageContent``Bot` 增加用于根据引用 `MessageReference` 获取源消息的API ([`9ff7e9473`](https://github.com/simple-robot/simpler-robot/commit/9ff7e9473))
- build(api): 在 simbot-api 中生成携带部分常量信息的 builtin ([`f58c080b2`](https://github.com/simple-robot/simpler-robot/commit/f58c080b2))
- build(deps): bump slf4j from 2.0.13 to 2.0.15 ([`40dcf0ecf`](https://github.com/simple-robot/simpler-robot/commit/40dcf0ecf))
- build(deps): bump plugin.spring from 2.0.0 to 2.0.10 ([`385be898f`](https://github.com/simple-robot/simpler-robot/commit/385be898f))
- build(deps): bump ksp from 2.0.0-1.0.24 to 2.0.10-1.0.24 ([`e9c81da85`](https://github.com/simple-robot/simpler-robot/commit/e9c81da85))
- build(deps): bump org.jetbrains.kotlin.plugin.allopen ([`d3708123b`](https://github.com/simple-robot/simpler-robot/commit/d3708123b))
- build(deps): bump com.squareup:kotlinpoet-ksp from 1.17.0 to 1.18.1 ([`25c7b4923`](https://github.com/simple-robot/simpler-robot/commit/25c7b4923))
- build(deps): bump org.jetbrains.kotlinx:lincheck from 2.32 to 2.33 ([`f218cd18c`](https://github.com/simple-robot/simpler-robot/commit/f218cd18c))
- build(deps): bump org.jetbrains.kotlinx.binary-compatibility-validator ([`dc8672440`](https://github.com/simple-robot/simpler-robot/commit/dc8672440))
- build(deps): bump ksp from 2.0.0-1.0.23 to 2.0.0-1.0.24 ([`d7482901a`](https://github.com/simple-robot/simpler-robot/commit/d7482901a))
- build(deps): bump com.github.gmazzo.buildconfig from 5.3.5 to 5.4.0 ([`32ec83010`](https://github.com/simple-robot/simpler-robot/commit/32ec83010))
- build(deps): bump ksp from 2.0.0-1.0.22 to 2.0.0-1.0.23 ([`bce28e3fd`](https://github.com/simple-robot/simpler-robot/commit/bce28e3fd))

# v4.5.0

> Release & Pull Notes: [v4.5.0](https://github.com/simple-robot/simpler-robot/releases/tag/v4.5.0)
Expand All @@ -9,15 +31,6 @@
- build(deps): bump io.mockk:mockk from 1.13.11 to 1.13.12 ([`737d87505`](https://github.com/simple-robot/simpler-robot/commit/737d87505))


> Release & Pull Notes: [v4.4.0](https://github.com/simple-robot/simpler-robot/releases/tag/v4.4.0)
- fix(quantcat): 优化统一MergedBinder对null结果、失败结果的处理 ([`d741b8617`](https://github.com/simple-robot/simpler-robot/commit/d741b8617))
- feat(common-streamable): 增加模块与新的公共类型 Streamable, 用来简化部分针对 Sequence 类型的转化操作,例如在JVM中转为 Stream 和在 JS 中转为数组。 ([`1ba898c57`](https://github.com/simple-robot/simpler-robot/commit/1ba898c57))
- fix(quantcat): 优化统一MergedBinder对null结果、失败结果的处理 ([`9c5777847`](https://github.com/simple-robot/simpler-robot/commit/9c5777847))
- feat(common-streamable): 增加模块与新的公共类型 Streamable, 用来简化部分针对 Sequence 类型的转化操作,例如在JVM中转为 Stream 和在 JS 中转为数组。 ([`ca3eaa02b`](https://github.com/simple-robot/simpler-robot/commit/ca3eaa02b))

# v4.3.1

> Release & Pull Notes: [v4.3.1](https://github.com/simple-robot/simpler-robot/releases/tag/v4.3.1)
- fix(quantcat): 修复使用KeywordBinder时无法正确处理参数类型的问题 ([`ef31604c7`](https://github.com/simple-robot/simpler-robot/commit/ef31604c7))
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import io.gitlab.arturbosch.detekt.Detekt
plugins {
idea
id("simbot.dokka-multi-module")
id("com.github.gmazzo.buildconfig") version "5.3.5" apply false
id("com.github.gmazzo.buildconfig") version "5.4.0" apply false
alias(libs.plugins.detekt)
id("simbot.nexus-publish")
id("simbot.changelog-generator")
Expand Down
1 change: 1 addition & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ val kotlinVersion: String = libs.versions.kotlin.get()
dependencies {
implementation(kotlin("gradle-plugin", kotlinVersion))
implementation(kotlin("serialization", kotlinVersion))
implementation(kotlin("power-assert", kotlinVersion))
implementation(libs.bundles.dokka)

// see https://github.com/gradle-nexus/publish-plugin
Expand Down
9 changes: 6 additions & 3 deletions buildSrc/src/main/kotlin/JsConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ inline fun KotlinJsTargetDsl.configJs(
nodejs {
testTask {
useMocha {
timeout = "10000"
timeout = "50000"
}
}
}
Expand All @@ -46,7 +46,6 @@ inline fun KotlinJsTargetDsl.configJs(
testTask {
useKarma {
useChromeHeadless()
// useConfigDirectory(File(project.rootProject.projectDir, "karma"))
}
}
}
Expand Down Expand Up @@ -75,6 +74,11 @@ inline fun KotlinWasmJsTargetDsl.configWasmJs(
) {
if (nodeJs) {
nodejs {
testTask {
useMocha {
timeout = "50000"
}
}
}
}
// if (nodeJs && isLinux) {
Expand All @@ -87,7 +91,6 @@ inline fun KotlinWasmJsTargetDsl.configWasmJs(
testTask {
useKarma {
useChromeHeadless()
// useConfigDirectory(File(project.rootProject.projectDir, "karma"))
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions buildSrc/src/main/kotlin/P.kt
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ sealed class P(override val group: String) : ProjectDetail() {
*/
companion object {
const val VERSION = "4.5.0"
const val NEXT_VERSION = "4.5.1"
const val VERSION = "4.6.0"
const val NEXT_VERSION = "4.6.1"
const val SNAPSHOT_VERSION = "$VERSION-SNAPSHOT"
const val NEXT_SNAPSHOT_VERSION = "$NEXT_VERSION-SNAPSHOT"

Expand All @@ -64,6 +64,7 @@ sealed class P(override val group: String) : ProjectDetail() {
const val GROUP_QUANTCAT = "love.forte.simbot.quantcat"
const val GROUP_EXTENSION = "love.forte.simbot.extension"
const val GROUP_BENCHMARK = "love.forte.simbot.benchmark"
const val GROUP_PROCESSOR = "love.forte.simbot.processor"

// const val COMPONENT_GROUP = "love.forte.simbot.component"
const val DESCRIPTION = "Simple Robot,一个通用的bot风格事件调度框架,以灵活的统一标准来编写bot应用。"
Expand Down
44 changes: 0 additions & 44 deletions buildSrc/src/main/kotlin/simbot.changelog-generator.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,53 +23,9 @@

import changelog.generateChangelog

/*
* Copyright (c) 2022-2022 ForteScarlet <[email protected]>
*
* 本文件是 simply-robot (即 simple robot的v3版本,因此亦可称为 simple-robot v3 、simbot v3 等) 的一部分。
*
* simply-robot 是自由软件:你可以再分发之和/或依照由自由软件基金会发布的 GNU 通用公共许可证修改之,无论是版本 3 许可证,还是(按你的决定)任何以后版都可以。
*
* 发布 simply-robot 是希望它能有用,但是并无保障;甚至连可销售和符合某个特定的目的都不保证。请参看 GNU 通用公共许可证,了解详情。
*
* 你应该随程序获得一份 GNU 通用公共许可证的复本。如果没有,请看:
* https://www.gnu.org/licenses
* https://www.gnu.org/licenses/gpl-3.0-standalone.html
* https://www.gnu.org/licenses/lgpl-3.0-standalone.html
*
*
*/


tasks.create("createChangelog") {
group = "documentation"
doFirst {
generateChangelog("v${P.VERSION}")
}
}


tasks.create("updateWebsiteVersionJson") {
group = "documentation"
doFirst {
val version = P.Simbot.version.toString()

val websiteVersionJsonDir = rootProject.file("website/static")
if (!websiteVersionJsonDir.exists()) {
websiteVersionJsonDir.mkdirs()
}
val websiteVersionJsonFile = File(websiteVersionJsonDir, "version.json")
if (!websiteVersionJsonFile.exists()) {
websiteVersionJsonFile.createNewFile()
}

websiteVersionJsonFile.writeText(
"""
{
"version": "$version"
}
""".trimIndent()
)
}
}

29 changes: 15 additions & 14 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
[versions]
kotlin = "2.0.0"
kotlin = "2.0.10"
dokka = "1.9.20"
kotlinx-coroutines = "1.8.1"
kotlinx-serialization = "1.7.1"
spring-boot-v2 = "2.7.18"
spring-boot-v3 = "3.2.1"
openjdk-jmh = "1.36"
ktor = "2.3.12"
slf4j = "2.0.13"
slf4j = "2.0.16"
# https://kotlinlang.org/docs/ksp-quickstart.html
# https://github.com/google/ksp
ksp = "2.0.0-1.0.22"
ksp = "2.0.10-1.0.24"
# https://square.github.io/kotlinpoet/
kotlinPoet = "1.17.0"
kotlinPoet = "1.18.1"
# https://github.com/Kotlin/kotlinx-benchmark
kotlinxBenchmark = "0.4.11"
reactor = "3.6.2"
#kotlinxBenchmark = "0.4.11"
reactor = "3.6.9"
# simbots
suspendTransform = "0.9.0"
suspendReversal = "0.2.0"
Expand All @@ -42,15 +42,12 @@ dokka-base = { group = "org.jetbrains.dokka", name = "dokka-base", version.ref =

# kotlinx-coroutines
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-jdk8 = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-jdk8", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-reactive = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-reactive", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-reactor = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-reactor", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-rx2 = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-rx2", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-rx3 = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-rx3", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-guava = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-guava", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-jdk9 = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-jdk9", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-slf4j = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-slf4j", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-play-services = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-play-services", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-debug = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-debug", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" }

Expand Down Expand Up @@ -86,7 +83,7 @@ spring-boot-v3-dependencies = { group = "org.springframework.boot", name = "spri
spring-boot-v3-autoconfigure = { group = "org.springframework.boot", name = "spring-boot-autoconfigure" } # , version.ref = "spring-boot-v3"
spring-boot-v3-logging = { group = "org.springframework.boot", name = "spring-boot-starter-logging" } # , version.ref = "spring-boot-v3"
spring-boot-v3-actuator = { group = "org.springframework.boot", name = "spring-boot-starter-actuator" } # , version.ref = "spring-boot-v3"
spring-boot-v3-configuration-processor = { group = "org.springframework.boot", name = "spring-boot-configuration-processor", version.ref = "spring-boot-v3" } # , version.ref = "spring-boot-v3"
spring-boot-v3-configuration-processor = { group = "org.springframework.boot", name = "spring-boot-configuration-processor", version.ref = "spring-boot-v3" }
spring-boot-v3-aop = { group = "org.springframework.boot", name = "spring-boot-starter-aop" } # , version.ref = "spring-boot-v3"
spring-boot-v3-test = { group = "org.springframework.boot", name = "spring-boot-starter-test" } # , version.ref = "spring-boot-v3"
spring-boot-v3-webflux = { group = "org.springframework.boot", name = "spring-boot-starter-webflux" } # , version.ref = "spring-boot-v3"
Expand Down Expand Up @@ -115,7 +112,7 @@ ktor-client-mock = { group = "io.ktor", name = "ktor-client-mock", version.ref =

# Lincheck
# https://kotlinlang.org/docs/lincheck-guide.html#associate-compiler-tasks
kotlinx-lincheck = "org.jetbrains.kotlinx:lincheck:2.32"
kotlinx-lincheck = "org.jetbrains.kotlinx:lincheck:2.33"

# https://github.com/ForteScarlet/kotlin-suspend-interface-reversal
suspend-reversal-annotations = { module = "love.forte.suspend-interface-reversal:annotations", version.ref = "suspendReversal" }
Expand All @@ -140,12 +137,12 @@ gradle-common-publication = { group = "love.forte.gradle.common", name = "gradle
mockk = { group = "io.mockk", name = "mockk", version.ref = "mockk" }

# benchmark
kotlinx-benchmark-runtime = { group = "org.jetbrains.kotlinx", name = "kotlinx-benchmark-runtime", version.ref = "kotlinxBenchmark" }
#kotlinx-benchmark-runtime = { group = "org.jetbrains.kotlinx", name = "kotlinx-benchmark-runtime", version.ref = "kotlinxBenchmark" }


[plugins]
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
kotlinxBenchmark = { id = "org.jetbrains.kotlinx.benchmark", version.ref = "kotlinxBenchmark" }
#kotlinxBenchmark = { id = "org.jetbrains.kotlinx.benchmark", version.ref = "kotlinxBenchmark" }
kotlinAllOpen = { id = "org.jetbrains.kotlin.plugin.allopen", version.ref = "kotlin" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
# Kover
Expand All @@ -154,7 +151,11 @@ detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
kotlinxKover = { id = "org.jetbrains.kotlinx.kover", version = "0.8.3" }
# binary-compatibility-validator
# https://github.com/Kotlin/binary-compatibility-validator
kotlinxBinaryCompatibilityValidator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version = "0.15.1" }
kotlinxBinaryCompatibilityValidator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version = "0.16.3" }

spring = { id = "org.springframework.boot", version.ref = "spring-boot-v3" }
spring-dependencyManagement = { id = "io.spring.dependency-management", version = "1.1.5" }
kotlin-plugin-spring = { id = "org.jetbrains.kotlin.plugin.spring", version.ref = "kotlin" }

[bundles]
gradle-common = ["gradle-common-core", "gradle-common-multiplatform", "gradle-common-publication"]
Expand Down
3 changes: 3 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ include(":internal-processors:interface-uml-processor")
// gradle
include(":simbot-gradles:simbot-gradle-suspendtransforms")

// processors
include("simbot-processors:simbot-processor-message-element-polymorphic-include")

include(":simbot-commons:simbot-common-annotations")
include(":simbot-commons:simbot-common-collection")
include(":simbot-commons:simbot-common-streamable")
Expand Down
23 changes: 23 additions & 0 deletions simbot-api/api/simbot-api.api
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
public final class love/forte/simbot/SimbotBuiltin {
public static final field BUILD_AT Ljava/lang/String;
public static final field BUILD_KOTLIN_VERSION Ljava/lang/String;
public static final field INSTANCE Llove/forte/simbot/SimbotBuiltin;
public static final field IS_SNAPSHOT Z
public static final field VERSION Ljava/lang/String;
}

public abstract interface class love/forte/simbot/ability/AcceptOption {
}

Expand Down Expand Up @@ -358,6 +366,16 @@ public abstract interface class love/forte/simbot/bot/Bot : kotlinx/coroutines/C
public abstract synthetic fun join (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun joinBlocking ()V
public fun joinReserve ()Llove/forte/simbot/suspendrunner/reserve/SuspendReserve;
public synthetic fun messageFromId (Llove/forte/simbot/common/id/ID;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun messageFromId$suspendImpl (Llove/forte/simbot/bot/Bot;Llove/forte/simbot/common/id/ID;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun messageFromIdAsync (Llove/forte/simbot/common/id/ID;)Ljava/util/concurrent/CompletableFuture;
public fun messageFromIdBlocking (Llove/forte/simbot/common/id/ID;)Llove/forte/simbot/message/MessageContent;
public fun messageFromIdReserve (Llove/forte/simbot/common/id/ID;)Llove/forte/simbot/suspendrunner/reserve/SuspendReserve;
public synthetic fun messageFromReference (Llove/forte/simbot/message/MessageReference;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun messageFromReference$suspendImpl (Llove/forte/simbot/bot/Bot;Llove/forte/simbot/message/MessageReference;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun messageFromReferenceAsync (Llove/forte/simbot/message/MessageReference;)Ljava/util/concurrent/CompletableFuture;
public fun messageFromReferenceBlocking (Llove/forte/simbot/message/MessageReference;)Llove/forte/simbot/message/MessageContent;
public fun messageFromReferenceReserve (Llove/forte/simbot/message/MessageReference;)Llove/forte/simbot/suspendrunner/reserve/SuspendReserve;
public abstract synthetic fun start (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun startAsync ()Ljava/util/concurrent/CompletableFuture;
public fun startBlocking ()V
Expand Down Expand Up @@ -1956,9 +1974,14 @@ public abstract interface class love/forte/simbot/message/MessageContent : love/
public abstract fun getPlainText ()Ljava/lang/String;
public fun getReference ()Llove/forte/simbot/message/MessageReference;
public fun getReferenceAsync ()Ljava/util/concurrent/CompletableFuture;
public fun getReferenceMessage ()Llove/forte/simbot/message/MessageContent;
public fun getReferenceMessageAsync ()Ljava/util/concurrent/CompletableFuture;
public fun getReferenceMessageReserve ()Llove/forte/simbot/suspendrunner/reserve/SuspendReserve;
public fun getReferenceReserve ()Llove/forte/simbot/suspendrunner/reserve/SuspendReserve;
public synthetic fun reference (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun reference$suspendImpl (Llove/forte/simbot/message/MessageContent;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public synthetic fun referenceMessage (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun referenceMessage$suspendImpl (Llove/forte/simbot/message/MessageContent;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}

public final class love/forte/simbot/message/MessageContentKt {
Expand Down
Loading

0 comments on commit 61361be

Please sign in to comment.