Skip to content

Commit

Permalink
update version to v3.3.0.0-beta.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ForteScarlet committed Dec 26, 2023
1 parent fd9a577 commit 1d143b0
Show file tree
Hide file tree
Showing 15 changed files with 125 additions and 221 deletions.
8 changes: 8 additions & 0 deletions .changelog/v3.3.0.0-beta.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
> 对应核心版本: [**v3.3.0**](https://github.com/simple-robot/simpler-robot/releases/tag/v3.3.0)
> **Warning**
> 目前版本尚处于 **`BETA`** 阶段,代表仍然可能存在大量[已知问题](https://github.com/simple-robot/simbot-component-kook/issues)或未知问题,
以及未完善的内容和落后于官方更新的内容。**

我们欢迎并期望着您的的[反馈](https://github.com/simple-robot/simbot-component-kook/issues)[协助](https://github.com/simple-robot/simbot-component-kook/pulls)
感谢您的贡献与支持!
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# v3.3.0.0-beta.1

> Release & Pull Notes: [v3.3.0.0-beta.1](https://github.com/simple-robot/simpler-robot/releases/tag/v3.3.0.0-beta.1)
- fix: 消息发送中增加对 AtAll 的支持 ([`9363c9e`](https://github.com/simple-robot/simpler-robot/commit/9363c9e))
- website: 配置域名 ([`bfc48ad`](https://github.com/simple-robot/simpler-robot/commit/bfc48ad))
- fix(doc): 修复部分对配置文件 `ticket` 的描述错误问题 ([`3841f05`](https://github.com/simple-robot/simpler-robot/commit/3841f05))
- CI: Qodana for branches 'main' ([`e813648`](https://github.com/simple-robot/simpler-robot/commit/e813648))

# v3.2.0.0-alpha.8

> Release & Pull Notes: [v3.2.0.0-alpha.8](https://github.com/simple-robot/simpler-robot/releases/tag/v3.2.0.0-alpha.8)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

KOOK组件的**组件手册**: [组件手册][website]

> **Note**
> [!note]
> 手册与simbot3官网均部署于GitHub Pages。
> 为了更好的浏览体验,**推荐**开启魔法后访问。
Expand All @@ -35,7 +35,7 @@ KOOK组件的**组件手册**: [组件手册][website]
<details>
<summary>简单示例</summary>

> **Note**
> [!note]
> Java开发者可直接参考 [组件手册][website]**快速开始**相关示例的Java部分代码。
> 使用 Kotlin + `simbot-component-kook-core` 配合 `simboot-core-spring-boot-starter` 使用 `Spring Boot` 的情况下:
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 @@ -39,7 +39,7 @@ import love.forte.gradle.common.core.project.version as v
*
*/

val simbotVersion = v(3, 2, 0)
val simbotVersion = v(3, 3, 0)

val simbotApi = "love.forte.simbot:simbot-api:$simbotVersion"
val simbotAnnotations = "love.forte.simbot.util:simbot-annotations:$simbotVersion"
Expand Down Expand Up @@ -68,7 +68,7 @@ object P : ProjectDetail() {
0, 0
)

private val alphaSuffix = v("alpha", 8)
private val alphaSuffix = v("beta", 1)

override val version: Version = baseVersion - alphaSuffix

Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/SuspendTransforms.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ object SuspendTransforms {
*/
val jvmAsyncTransformer = SuspendTransformConfiguration.jvmAsyncTransformer.copy(
syntheticFunctionIncludeAnnotations = includeAnnotations,
transformFunctionInfo = FunctionInfo("love.forte.simbot.utils", null, "$\$runInAsync"),
transformFunctionInfo = FunctionInfo("love.forte.simbot.utils", null, "$\$runInAsyncNullable"),
copyAnnotationExcludes = SuspendTransformConfiguration.jvmAsyncTransformer.copyAnnotationExcludes + SuspendTransformConfiguration.jvmAsyncTransformer.markAnnotation.classInfo
)

Expand Down
12 changes: 7 additions & 5 deletions buildSrc/src/main/kotlin/changelog/GenerateChangelog.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,19 @@ fun Project.generateChangelog(tag: String) {

val coreVersion = simbotVersion

file.writeText("""
file.writeText(
"""
> 对应核心版本: [**v$coreVersion**](https://github.com/simple-robot/simpler-robot/releases/tag/v$coreVersion)
> **Warning**
> 目前版本尚处于 **`ALPHA`** 阶段,代表仍然可能存在大量[已知问题](https://github.com/simple-robot/simbot-component-kook/issues)或未知问题,
> [!warning]
> 目前版本尚处于 **`BETA`** 阶段,代表仍然可能存在部分[已知问题](https://github.com/simple-robot/simbot-component-kook/issues)或未知问题,
以及未完善的内容和落后于官方更新的内容。**
我们欢迎并期望着您的的[反馈](https://github.com/simple-robot/simbot-component-kook/issues)或[协助](https://github.com/simple-robot/simbot-component-kook/pulls),
感谢您的贡献与支持!
""".trimIndent())
""".trimIndent()
)
}

val rootChangelogFile = rootProject.file("CHANGELOG.md").also { file ->
Expand Down Expand Up @@ -155,7 +157,7 @@ fun Project.generateChangelog(tag: String) {
}
}

val tmpDir = rootProject.buildDir.resolve("tmp/changelog").apply { mkdirs() }
val tmpDir = rootProject.layout.buildDirectory.dir("tmp/changelog").get().asFile

val tmpFile =
Files.createTempFile(tmpDir.toPath(), "changelog", "tmp").toFile()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ multiplatformConfigPublishing {
project = P

val jarJavadoc by tasks.registering(Jar::class) {
group = "documentation"
archiveClassifier.set("javadoc")
from(tasks.findByName("dokkaHtml"))
}
Expand All @@ -57,11 +56,12 @@ multiplatformConfigPublishing {
if (systemProp("SIMBOT_LOCAL").toBoolean()) {
mainHost = null
}
// else {
//
// mainHostSupportedTargets = mainHost?.supports(hostManager) ?: emptySet()
// }
}

// TODO see https://github.com/gradle-nexus/publish-plugin/issues/208#issuecomment-1465029831
val signingTasks: TaskCollection<Sign> = tasks.withType<Sign>()
tasks.withType<PublishToMavenRepository>().configureEach {
mustRunAfter(signingTasks)
}

fun KonanTarget.supports(hostManager: HostManager): Set<String> {
Expand Down
5 changes: 5 additions & 0 deletions buildSrc/src/main/kotlin/simbot-kook-maven-publish.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ if (!isCi || isLinux) {
}
}

// TODO see https://github.com/gradle-nexus/publish-plugin/issues/208#issuecomment-1465029831
val signingTasks: TaskCollection<Sign> = tasks.withType<Sign>()
tasks.withType<PublishToMavenRepository>().configureEach {
mustRunAfter(signingTasks)
}

fun MavenPublication.show() {
//// show project info
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ forte-di = "0.0.3"
forte-annotationTool = "0.6.3"
ktor = "2.3.0"
log4j = "2.20.0"
atomicfu = "0.20.1"
atomicfu = "0.23.1"

[libraries]
# jetbrains-annotation
Expand Down
4 changes: 2 additions & 2 deletions simbot-component-kook-api/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# simple-component-kook-api

> **Note**
> [!note]
> 请先阅读 [模块说明](Module.md)
> **Note**
> [!note]
> 更详细的快速开始建议前往阅读 [组件手册](https://component-kook.simbot.forte.love/docs/quick-start/api) 中的相关章节。

Expand Down
127 changes: 32 additions & 95 deletions simbot-component-kook-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

import love.forte.gradle.common.core.project.setup
import love.forte.gradle.common.kotlin.multiplatform.NativeTargets

plugins {
kotlin("multiplatform")
Expand All @@ -42,6 +41,7 @@ repositories {

kotlin {
explicitApi()
applyDefaultHierarchyTemplate()

sourceSets.configureEach {
languageSettings {
Expand Down Expand Up @@ -69,85 +69,34 @@ kotlin {
}


val mainPresets = mutableSetOf<org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet>()
val testPresets = mutableSetOf<org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet>()

// see https://kotlinlang.org/docs/native-target-supporsupportTargets = setOf(
//// // Tier 1
//// "linuxX64",
//// "macosX64",
//// "macosArm64",
//// "iosSimulatorArm64",
//// "iosX64",
////
//// // Tier 2
////// "linuxArm64",
//// "watchosSimulatorArm64",
//// "watchosX64",
//// "watchosArm32",
//// "watchosArm64",
//// "tvosSimulatorArm64",
//// "tvosX64",
//// "tvosArm64",
//// "iosArm64",
////
//// // Tier 3
////// "androidNativeArm32",
////// "androidNativeArm64",
////// "androidNativeX86",
////// "androidNativeX64",
//// "mingwX64",
////// "watchosDeviceArm64",
//// )t.html
// val

val targets = NativeTargets.Official.all.intersect(NativeTargets.KtorClient.all)


targets {
presets.filterIsInstance<org.jetbrains.kotlin.gradle.plugin.mpp.AbstractKotlinNativeTargetPreset<*>>()
.filter { it.name in targets }
.forEach { presets ->
val target = fromPreset(presets, presets.name)
val mainSourceSet = target.compilations["main"].kotlinSourceSets.first()
val testSourceSet = target.compilations["test"].kotlinSourceSets.first()

val tn = target.name
when {
// just for test
// main中只使用HttpClient但用不到引擎,没必要指定

// win
tn.startsWith("mingw") -> {
testSourceSet.dependencies {
implementation(libs.ktor.client.winhttp)
}
}
// linux: CIO..?
tn.startsWith("linux") -> {
testSourceSet.dependencies {
implementation(libs.ktor.client.cio)
}
}

// darwin based
tn.startsWith("macos")
|| tn.startsWith("ios")
|| tn.startsWith("watchos")
|| tn.startsWith("tvos") -> {
testSourceSet.dependencies {
implementation(libs.ktor.client.darwin)
}
}
}

mainPresets.add(mainSourceSet)
testPresets.add(testSourceSet)
}
}
// Tier 1
macosX64()
macosArm64()
iosSimulatorArm64()
iosX64()

// Tier 2
linuxX64()
linuxArm64()
watchosSimulatorArm64()
watchosX64()
watchosArm32()
watchosArm64()
tvosSimulatorArm64()
tvosX64()
tvosArm64()
iosArm64()

// Tier 3
// androidNativeArm32()
// androidNativeArm64()
// androidNativeX86()
// androidNativeX64()
mingwX64()
// watchosDeviceArm64()

sourceSets {
val commonMain by getting {
commonMain {
dependencies {
compileOnly(simbotAnnotations)
api(simbotRequestorCore)
Expand All @@ -159,21 +108,21 @@ kotlin {
}
}

val commonTest by getting {
commonTest {
dependencies {
implementation(kotlin("test"))
implementation(libs.kotlinx.coroutines.test)
}
}

getByName("jvmMain") {
jvmMain {
dependencies {
compileOnly(simbotApi) // use @Api4J annotation
compileOnly(simbotAnnotations) // use @Api4J annotation
}
}

getByName("jvmTest") {
jvmTest {
dependencies {
implementation(libs.ktor.client.cio)
implementation(simbotApi) // use @Api4J annotation
Expand All @@ -183,28 +132,16 @@ kotlin {
}
}

getByName("jsMain") {
jsMain {
dependencies {
api(libs.ktor.client.js)
}
}
getByName("jsTest") {
jsTest {
dependencies {
api(libs.ktor.client.js)
}
}

val nativeMain by creating {
dependsOn(commonMain)
}

val nativeTest by creating {
dependsOn(commonTest)
}

configure(mainPresets) { dependsOn(nativeMain) }
configure(testPresets) { dependsOn(nativeTest) }

}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import kotlin.coroutines.CoroutineContext
import kotlin.coroutines.coroutineContext
import kotlin.jvm.JvmField
import kotlin.jvm.JvmSynthetic
import kotlin.jvm.Volatile

/**
* 面向平台实现的 [KookApi] 的抽象类。
Expand Down Expand Up @@ -429,7 +428,7 @@ public abstract class KookPostApi<T> : BaseKookApi<T>() {
override val method: HttpMethod
get() = HttpMethod.Post

@Volatile
@kotlin.concurrent.Volatile
private lateinit var _body: Any

/**
Expand Down
Loading

0 comments on commit 1d143b0

Please sign in to comment.