Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release: v4.1.1 #243

Merged
merged 14 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 11 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,35 +52,22 @@ SDK 实现库,
[协助](https://github.com/simple-robot/simbot-component-qq-guild/pulls),
感谢您的贡献与支持!

## 模块引导
## 概述

### API模块

基于 `Ktor` 针对 [QQ频道API](https://bot.q.qq.com/wiki/develop/api/)
的基本完整的[KMP](https://kotlinlang.org/docs/multiplatform.html)多平台封装实现,
是一个简单高效轻量级的API实现模块。

此模块基本不会提供什么多余的实现,其目标为在提供封装的情况下尽可能地保留原始API的使用手感,不做过多的封装。

👉 [前往模块](simbot-component-qq-guild-api) 了解更多。

### 标准库模块

基于 [API模块](simbot-component-qq-guild-api) 针对bot的"登录"鉴权实现简单高效轻量级的事件订阅功能。

此模块在API模块的基础上提供了针对事件相关的功能实现,包括事件订阅的能力。
同样的,其目标为在提供封装的情况下尽可能地保留原始API的使用手感,不做过多的封装。
QQ机器人组件是对 [simbot4核心库](https://github.com/simple-robot/simpler-robot)
的组件实现,
是一个相对高度封装的模块,并提供simbot大部分能力,包括事件监听、多组件协同、Spring Boot Starter 等。

👉 [前往模块](simbot-component-qq-guild-stdlib) 了解更多
👉 [前往模块](simbot-component-qq-guild-core) 了解更多~

### 核心组件模块 ⭐
## 命名说明

基于 [标准库模块](simbot-component-qq-guild-stdlib)
对 [simbot4核心库](https://github.com/simple-robot/simpler-robot)
的组件实现,
是一个相对高度封装的模块,并提供simbot4大部分能力,包括事件监听、多组件协同、Spring Boot Starter 等
QQ机器人组件命名为 `simbot-component-qq-guild` ,
因为最早开始QQ并未开放普通个人开发者使用QQ群聊、QQ单聊的功能,
因此此组件当时仅支持QQ频道。
在开放后,其两端可以合并在一起使用,因此QQ群相关的能力才被支持

👉 [前往模块](simbot-component-qq-guild-core) 了解更多。
> 也许未来会更名为 `simbot-component-qq` ?

## 法欧莉!

Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ apiValidation {
"love.forte.simbot.annotations.InternalSimbotAPI",
"love.forte.simbot.qguild.QGInternalApi",
"love.forte.simbot.component.qguild.ExperimentalQGApi",
"love.forte.simbot.qguild.ExperimentalQGMediaApi"
),
)

Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/P.kt
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ object P {
override val homepage: String get() = HOMEPAGE


const val VERSION = "4.1.0"
const val NEXT_VERSION = "4.1.1"
const val VERSION = "4.1.1"
const val NEXT_VERSION = "4.1.2"

override val snapshotVersion = "$NEXT_VERSION-SNAPSHOT"
override val version = if (isSnapshot()) snapshotVersion else VERSION
Expand Down
8 changes: 6 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ kotlin = "2.0.20"
kotlinx-coroutines = "1.9.0"
kotlinx-serialization = "1.7.3"
kotlinx-datetime = "0.6.1"
kotlinx-io = "0.5.4"
dokka = "1.9.20"
ktor = "2.3.12"
log4j = "2.24.1"
# simbot
simbot = "4.6.1"
simbot = "4.7.0"
suspendTransform = "2.0.20-0.9.3"
gradleCommon = "0.6.0"
# ksp
ksp = "2.0.20-1.0.25"
# https://square.github.io/kotlinpoet/
kotlinPoet = "1.18.1"
kotlinPoet = "2.0.0"
# https://detekt.dev/docs/intro
# TODO apply detekt
detekt = "1.23.7"
Expand Down Expand Up @@ -59,6 +60,9 @@ kotlinx-serialization-properties = { group = "org.jetbrains.kotlinx", name = "ko
# kotlinx-datetime
kotlinx-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version.ref = "kotlinx-datetime" }

# kotlinx-io
kotlinx-io-core = { module = "org.jetbrains.kotlinx:kotlinx-io-core", version.ref = "kotlinx-io" }

# ktor
ktor-serialization-kotlinxJson = { group = "io.ktor", name = "ktor-serialization-kotlinx-json", version.ref = "ktor" }
ktor-server-contentNegotiation = { group = "io.ktor", name = "ktor-server-content-negotiation", version.ref = "ktor" }
Expand Down
2 changes: 1 addition & 1 deletion samples/webhook-server-ktor/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dependencies {
implementation("io.ktor:ktor-server-core-jvm:$ktorVersion")
implementation("io.ktor:ktor-server-netty-jvm:$ktorVersion")

val logbackVersion = "1.4.14"
val logbackVersion = "1.5.12"
implementation("ch.qos.logback:logback-classic:$logbackVersion")

testImplementation("io.ktor:ktor-server-test-host")
Expand Down
2 changes: 1 addition & 1 deletion samples/webhook-server-spring-webflux/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
kotlin("jvm")
kotlin("plugin.spring")
id("org.springframework.boot") version "3.3.4"
id("org.springframework.boot") version "3.3.5"
id("io.spring.dependency-management") version "1.1.6"
}

Expand Down
2 changes: 1 addition & 1 deletion samples/webhook-server-spring/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
kotlin("jvm")
kotlin("plugin.spring")
id("org.springframework.boot") version "3.3.4"
id("org.springframework.boot") version "3.3.5"
id("io.spring.dependency-management") version "1.1.6"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ public final class love/forte/simbot/qguild/ErrInfo$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}

public abstract interface annotation class love/forte/simbot/qguild/ExperimentalQGMediaApi : java/lang/annotation/Annotation {
}

public abstract interface annotation class love/forte/simbot/qguild/Generated : java/lang/annotation/Annotation {
}

Expand Down Expand Up @@ -1032,10 +1035,11 @@ public final class love/forte/simbot/qguild/api/files/UploadGroupFilesApi : love
public static final field FILE_TYPE_IMAGE I
public static final field FILE_TYPE_VIDEO I
public static final field Factory Llove/forte/simbot/qguild/api/files/UploadGroupFilesApi$Factory;
public synthetic fun <init> (Ljava/lang/String;Llove/forte/simbot/qguild/api/files/UploadGroupFilesApi$Body;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ljava/lang/String;Llove/forte/simbot/qguild/api/files/UploadGroupFilesApi$BodyValue;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public static final fun create (Ljava/lang/String;ILjava/lang/String;)Llove/forte/simbot/qguild/api/files/UploadGroupFilesApi;
public static final fun create (Ljava/lang/String;ILjava/lang/String;Z)Llove/forte/simbot/qguild/api/files/UploadGroupFilesApi;
public static final fun create (Ljava/lang/String;Llove/forte/simbot/qguild/api/files/UploadGroupFilesApi$Body;)Llove/forte/simbot/qguild/api/files/UploadGroupFilesApi;
public static final fun create (Ljava/lang/String;Llove/forte/simbot/qguild/api/files/UploadGroupFilesApi$BodyValue;)Llove/forte/simbot/qguild/api/files/UploadGroupFilesApi;
public fun getResultDeserializationStrategy ()Lkotlinx/serialization/DeserializationStrategy;
}

Expand Down Expand Up @@ -1070,10 +1074,38 @@ public final class love/forte/simbot/qguild/api/files/UploadGroupFilesApi$Body$C
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}

public final class love/forte/simbot/qguild/api/files/UploadGroupFilesApi$BodyValue {
public static final field Companion Llove/forte/simbot/qguild/api/files/UploadGroupFilesApi$BodyValue$Companion;
public fun <init> ()V
public final fun getFileType ()Ljava/lang/Integer;
public final fun getSrvSendMsg ()Ljava/lang/Boolean;
public final fun getUrl ()Ljava/lang/String;
public final fun setFileType (Ljava/lang/Integer;)V
public final fun setSrvSendMsg (Ljava/lang/Boolean;)V
public final fun setUrl (Ljava/lang/String;)V
public fun toString ()Ljava/lang/String;
}

public synthetic class love/forte/simbot/qguild/api/files/UploadGroupFilesApi$BodyValue$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Llove/forte/simbot/qguild/api/files/UploadGroupFilesApi$BodyValue$$serializer;
public final fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Llove/forte/simbot/qguild/api/files/UploadGroupFilesApi$BodyValue;
public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Llove/forte/simbot/qguild/api/files/UploadGroupFilesApi$BodyValue;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}

public final class love/forte/simbot/qguild/api/files/UploadGroupFilesApi$BodyValue$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}

public final class love/forte/simbot/qguild/api/files/UploadGroupFilesApi$Factory : love/forte/simbot/qguild/api/SimplePostApiDescription {
public final fun create (Ljava/lang/String;ILjava/lang/String;)Llove/forte/simbot/qguild/api/files/UploadGroupFilesApi;
public final fun create (Ljava/lang/String;ILjava/lang/String;Z)Llove/forte/simbot/qguild/api/files/UploadGroupFilesApi;
public final fun create (Ljava/lang/String;Llove/forte/simbot/qguild/api/files/UploadGroupFilesApi$Body;)Llove/forte/simbot/qguild/api/files/UploadGroupFilesApi;
public final fun create (Ljava/lang/String;Llove/forte/simbot/qguild/api/files/UploadGroupFilesApi$BodyValue;)Llove/forte/simbot/qguild/api/files/UploadGroupFilesApi;
public static synthetic fun create$default (Llove/forte/simbot/qguild/api/files/UploadGroupFilesApi$Factory;Ljava/lang/String;ILjava/lang/String;ZILjava/lang/Object;)Llove/forte/simbot/qguild/api/files/UploadGroupFilesApi;
}

Expand All @@ -1083,10 +1115,11 @@ public final class love/forte/simbot/qguild/api/files/UploadUserFilesApi : love/
public static final field FILE_TYPE_IMAGE I
public static final field FILE_TYPE_VIDEO I
public static final field Factory Llove/forte/simbot/qguild/api/files/UploadUserFilesApi$Factory;
public synthetic fun <init> (Ljava/lang/String;Llove/forte/simbot/qguild/api/files/UploadUserFilesApi$Body;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ljava/lang/String;Llove/forte/simbot/qguild/api/files/UploadUserFilesApi$BodyValue;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public static final fun create (Ljava/lang/String;ILjava/lang/String;)Llove/forte/simbot/qguild/api/files/UploadUserFilesApi;
public static final fun create (Ljava/lang/String;ILjava/lang/String;Z)Llove/forte/simbot/qguild/api/files/UploadUserFilesApi;
public static final fun create (Ljava/lang/String;Llove/forte/simbot/qguild/api/files/UploadUserFilesApi$Body;)Llove/forte/simbot/qguild/api/files/UploadUserFilesApi;
public static final fun create (Ljava/lang/String;Llove/forte/simbot/qguild/api/files/UploadUserFilesApi$BodyValue;)Llove/forte/simbot/qguild/api/files/UploadUserFilesApi;
public fun getResultDeserializationStrategy ()Lkotlinx/serialization/DeserializationStrategy;
}

Expand Down Expand Up @@ -1121,10 +1154,38 @@ public final class love/forte/simbot/qguild/api/files/UploadUserFilesApi$Body$Co
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}

public final class love/forte/simbot/qguild/api/files/UploadUserFilesApi$BodyValue {
public static final field Companion Llove/forte/simbot/qguild/api/files/UploadUserFilesApi$BodyValue$Companion;
public fun <init> ()V
public final fun getFileType ()Ljava/lang/Integer;
public final fun getSrvSendMsg ()Ljava/lang/Boolean;
public final fun getUrl ()Ljava/lang/String;
public final fun setFileType (Ljava/lang/Integer;)V
public final fun setSrvSendMsg (Ljava/lang/Boolean;)V
public final fun setUrl (Ljava/lang/String;)V
public fun toString ()Ljava/lang/String;
}

public synthetic class love/forte/simbot/qguild/api/files/UploadUserFilesApi$BodyValue$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Llove/forte/simbot/qguild/api/files/UploadUserFilesApi$BodyValue$$serializer;
public final fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Llove/forte/simbot/qguild/api/files/UploadUserFilesApi$BodyValue;
public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Llove/forte/simbot/qguild/api/files/UploadUserFilesApi$BodyValue;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}

public final class love/forte/simbot/qguild/api/files/UploadUserFilesApi$BodyValue$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}

public final class love/forte/simbot/qguild/api/files/UploadUserFilesApi$Factory : love/forte/simbot/qguild/api/SimplePostApiDescription {
public final fun create (Ljava/lang/String;ILjava/lang/String;)Llove/forte/simbot/qguild/api/files/UploadUserFilesApi;
public final fun create (Ljava/lang/String;ILjava/lang/String;Z)Llove/forte/simbot/qguild/api/files/UploadUserFilesApi;
public final fun create (Ljava/lang/String;Llove/forte/simbot/qguild/api/files/UploadUserFilesApi$Body;)Llove/forte/simbot/qguild/api/files/UploadUserFilesApi;
public final fun create (Ljava/lang/String;Llove/forte/simbot/qguild/api/files/UploadUserFilesApi$BodyValue;)Llove/forte/simbot/qguild/api/files/UploadUserFilesApi;
public static synthetic fun create$default (Llove/forte/simbot/qguild/api/files/UploadUserFilesApi$Factory;Ljava/lang/String;ILjava/lang/String;ZILjava/lang/Object;)Llove/forte/simbot/qguild/api/files/UploadUserFilesApi;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
package love.forte.simbot.qguild



/**
* 一个仅服务于Java的API。对于Kotlin来讲通常有更优选择。
*/
@Retention(AnnotationRetention.BINARY)
@MustBeDocumented
@RequiresOptIn("API marked for Java use, not recommended for Kotlin.", level = RequiresOptIn.Level.WARNING)
public annotation class QGApi4J

/**
* 一个仅服务于JS的API。对于Kotlin来讲通常有更优选择。
*/
Expand All @@ -50,3 +50,16 @@ public annotation class QGInternalApi
@Retention(AnnotationRetention.SOURCE)
@MustBeDocumented
public annotation class Generated

/**
* 一个**实验性**的与媒体资源相关的API,可能在未来发生变更或被移除。
*
* @since 4.1.1
*/
@Retention(AnnotationRetention.BINARY)
@MustBeDocumented
@RequiresOptIn(
"一个实验性的与媒体资源相关的API,可能在未来发生变更或被移除。",
level = RequiresOptIn.Level.WARNING
)
public annotation class ExperimentalQGMediaApi
Loading
Loading