From 7ecbdff32da4bd676b97eb2db313b4db223989e9 Mon Sep 17 00:00:00 2001 From: ForteScarlet Date: Mon, 24 Oct 2022 13:19:43 +0800 Subject: [PATCH] release: v3.0.0-M1 --- .changelog/v3.0.0-M1.md | 18 +++ buildSrc/src/main/kotlin/P.kt | 2 +- .../simbot.changelog-generator.gradle.kts | 122 +++--------------- 3 files changed, 38 insertions(+), 104 deletions(-) create mode 100644 .changelog/v3.0.0-M1.md diff --git a/.changelog/v3.0.0-M1.md b/.changelog/v3.0.0-M1.md new file mode 100644 index 000000000..b63213950 --- /dev/null +++ b/.changelog/v3.0.0-M1.md @@ -0,0 +1,18 @@ +
+仓库参考 + +| **模块** | **search.maven** | +|---------|------------------| +| simbot-logger | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot/simbot-logger/3.0.0-M1/jar) | +| simbot-logger-jvm | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-jvm/3.0.0-M1/jar) | +| simbot-logger-js | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-js/3.0.0-M1/jar) | +| simbot-api | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot/simbot-api/3.0.0-M1/jar) | +| simbot-core | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot/simbot-core/3.0.0-M1/jar) | +| simboot-api | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot.boot/simboot-api/3.0.0-M1/jar) | +| simboot-core | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot.boot/simboot-core/3.0.0-M1/jar) | +| simboot-core-annotation | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot.boot/simboot-core-annotation/3.0.0-M1/jar) | +| simboot-core-spring-boot-starter | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot.boot/simboot-core-spring-boot-starter/3.0.0-M1/jar) | + +
+ +期间暂无相关反馈,发布 `v3.0.0` 第一个预发布里程碑版本。将会开始逐步完善文档内容。 \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/P.kt b/buildSrc/src/main/kotlin/P.kt index d3d39be4e..e76de6002 100644 --- a/buildSrc/src/main/kotlin/P.kt +++ b/buildSrc/src/main/kotlin/P.kt @@ -76,7 +76,7 @@ sealed class P(override val group: String) : ProjectDetail() { init { val mainVersion = version(3, 0, 0) // - var status = version("beta", 4) + var status = version("M1") versionWithoutSnapshot = mainVersion - status.copy() if (isSnapshot()) { status = status - Version.SNAPSHOT diff --git a/buildSrc/src/main/kotlin/simbot.changelog-generator.gradle.kts b/buildSrc/src/main/kotlin/simbot.changelog-generator.gradle.kts index 906eb90cd..8a81e69fe 100644 --- a/buildSrc/src/main/kotlin/simbot.changelog-generator.gradle.kts +++ b/buildSrc/src/main/kotlin/simbot.changelog-generator.gradle.kts @@ -56,14 +56,12 @@ tasks.create("createChangelog") { file.createNewFile() val autoGenerateText = buildString { - appendLine("**仓库参考:**").appendLine() - appendLine("
") appendLine("仓库参考") appendLine() - appendLine("| **模块** | **repo1.maven** | **search.maven** |") - appendLine("|---------|-----------------|------------------|") + appendLine("| **模块** | **search.maven** |") + appendLine("|---------|------------------|") repoRowMulti(simbotLoggerKotlin, "simbot-logger", "love.forte.simbot", "simbot-logger", realVersion) repoRow("simbot-api", "love.forte.simbot", "simbot-api", realVersion) repoRow("simbot-core", "love.forte.simbot", "simbot-core", realVersion) @@ -76,116 +74,28 @@ tasks.create("createChangelog") { appendLine("
") } - // val autoGenerateText0 = """ - // **仓库参考:** - // - // | **模块** | **repo1.maven** | **search.maven** | - // |---------|-----------------|------------------| - // ${repoRow("simbot-api", "love.forte.simbot", "simbot-api", realVersion)} - // ${repoRow("simbot-core", "love.forte.simbot", "simbot-core", realVersion)} - // ${repoRow("simbot-logger-jvm", "love.forte.simbot", "simbot-logger-jvm", realVersion)} - // ${repoRow("simbot-logger-js", "love.forte.simbot", "simbot-logger-js", realVersion)} - // ${repoRow("simbot-logger-macosx64", "love.forte.simbot", "simbot-logger-macosx64", realVersion)} - // ${repoRow("simbot-logger-linuxx64", "love.forte.simbot", "simbot-logger-linuxx64", realVersion)} - // ${repoRow("simbot-logger-mingwx64", "love.forte.simbot", "simbot-logger-mingwx64", realVersion)} - // ${repoRow("simboot-api", "love.forte.simbot.boot", "simboot-api", realVersion)} - // ${repoRow("simboot-core", "love.forte.simbot.boot", "simboot-core", realVersion)} - // ${repoRow("simboot-core-annotation", "love.forte.simbot.boot", "simboot-core-annotation", realVersion)} - // ${ - // repoRow( - // "simboot-core-spring-boot-starter", - // "love.forte.simbot.boot", - // "simboot-core-spring-boot-starter", - // realVersion - // ) - // } - // - // - // - // - // """.trimIndent() - - file.writeText(autoGenerateText) } - - /* - **仓库参考:** - - * [simbot-api: $version](https://repo1.maven.org/maven2/love/forte/simbot/simbot-api/$realVersion) - * [simbot-core: $version](https://repo1.maven.org/maven2/love/forte/simbot/simbot-core/$realVersion) - * [simbot-logger: $version](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger/$realVersion) - * [simboot-api: $version](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-api/$realVersion) - * [simboot-core: $version](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-core/$realVersion) - * [simboot-core-annotation: $version](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-core-annotation/$realVersion) - * [simboot-core-spring-boot-starter: $version](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-core-spring-boot-starter/$realVersion) - - */ - - // ## 组件更新 - // 相关组件会在后续三日内跟进更新 - // - [mirai组件](https://github.com/simple-robot/simbot-component-mirai/releases) - // - [腾讯频道组件](https://github.com/simple-robot/simbot-component-tencent-guild/releases) - // - [开黑啦组件](https://github.com/simple-robot/simbot-component-kaiheila/releases) - } } -// fun repoRow(moduleName: String, group: String, id: String, version: String): String { -// return "| $moduleName | [$moduleName: v$version](https://repo1.maven.org/maven2/${ -// group.replace( -// ".", -// "/" -// ) -// }/${ -// id.replace( -// ".", -// "/" -// ) -// }/$version) | [$moduleName: v$version](https://search.maven.org/artifact/$group/$id/$version/jar) |" -// } -// -// fun repoRowMulti( -// kotlin: KotlinMultiplatformExtension, -// moduleName: String, -// group: String, -// id: String, -// version: String, -// ): String { -// kotlin.targets.forEach { -// println("simbot-logger target: $it") -// } -// -// return repoRow(moduleName, group, id, version) -// } fun StringBuilder.repoRow(moduleName: String, group: String, id: String, version: String) { - append("| ").append(moduleName).append(" | [").append(moduleName).append(": v").append(version) - append("](https://repo1.maven.org/maven2/") - append(group.replace(".", "/")) - append('/') - append(id.replace(".", "/")) - append('/') - append(version) - append(") | [") - append(moduleName).append(": v").append(version) + append("| ").append(moduleName) + append(" | [") + append("v").append(version) append("](https://search.maven.org/artifact/") append(group).append("/").append(id).append("/").append(version).append("/jar) |") appendLine() - // "| $moduleName | [$moduleName: v$version](https://repo1.maven.org/maven2/${ - // group.replace( - // ".", - // "/" - // ) - // }/${ - // id.replace( - // ".", - // "/" - // ) - // }/$version) | [$moduleName: v$version](https://search.maven.org/artifact/$group/$id/$version/jar) |" } +private val multiPlatformType = setOf( + KotlinPlatformType.common, + KotlinPlatformType.jvm, + KotlinPlatformType.js, +) + fun StringBuilder.repoRowMulti( kotlin: KotlinMultiplatformExtension, moduleName: String, @@ -194,11 +104,17 @@ fun StringBuilder.repoRowMulti( version: String, ) { kotlin.targets.filter { - it.platformType != KotlinPlatformType.common + it.platformType in multiPlatformType }.sortedBy { it.platformType }.forEach { - repoRow("$moduleName-${it.targetName}", group, "$id-${it.targetName.toLowerCase()}", version) + when (it.platformType) { + KotlinPlatformType.common -> + repoRow("$moduleName", group, id, version) + else -> + repoRow("$moduleName-${it.targetName}", group, "$id-${it.targetName.toLowerCase()}", version) + } + } } \ No newline at end of file