-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #484 from simple-robot/v3.0.0-beta-dev
Release: v3.0.0-M1
- Loading branch information
Showing
4 changed files
with
84 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<details> | ||
<summary><b>仓库参考</b></summary> | ||
|
||
| **模块** | **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) | | ||
|
||
</details> | ||
|
||
期间暂无相关反馈,发布 `v3.0.0` 第一个预发布里程碑版本。将会开始逐步完善文档内容。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2022 ForteScarlet <[email protected]> | ||
* Copyright (c) 2022-2022 ForteScarlet <[email protected]> | ||
* | ||
* 本文件是 simply-robot (或称 simple-robot 3.x 、simbot 3.x ) 的一部分。 | ||
* | ||
|
@@ -56,14 +56,12 @@ tasks.create("createChangelog") { | |
file.createNewFile() | ||
|
||
val autoGenerateText = buildString { | ||
appendLine("**仓库参考:**").appendLine() | ||
|
||
appendLine("<details>") | ||
appendLine("<summary><b>仓库参考</b></summary>") | ||
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,127 +74,47 @@ tasks.create("createChangelog") { | |
appendLine("</details>") | ||
} | ||
|
||
// 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, | ||
group: String, | ||
id: String, | ||
version: String, | ||
) { | ||
kotlin.targets.forEach { | ||
if (it.platformType != KotlinPlatformType.common) { | ||
repoRow("$moduleName-${it.targetName}", group, "$id-${it.targetName.toLowerCase()}", version) | ||
kotlin.targets.filter { | ||
it.platformType in multiPlatformType | ||
}.sortedBy { | ||
it.platformType | ||
}.forEach { | ||
when (it.platformType) { | ||
KotlinPlatformType.common -> | ||
repoRow("$moduleName", group, id, version) | ||
else -> | ||
repoRow("$moduleName-${it.targetName}", group, "$id-${it.targetName.toLowerCase()}", version) | ||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters