Skip to content

Commit 7ecbdff

Browse files
committed
release: v3.0.0-M1
1 parent 7b9479f commit 7ecbdff

File tree

3 files changed

+38
-104
lines changed

3 files changed

+38
-104
lines changed

.changelog/v3.0.0-M1.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<details>
2+
<summary><b>仓库参考</b></summary>
3+
4+
| **模块** | **search.maven** |
5+
|---------|------------------|
6+
| simbot-logger | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot/simbot-logger/3.0.0-M1/jar) |
7+
| simbot-logger-jvm | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-jvm/3.0.0-M1/jar) |
8+
| simbot-logger-js | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-js/3.0.0-M1/jar) |
9+
| simbot-api | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot/simbot-api/3.0.0-M1/jar) |
10+
| simbot-core | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot/simbot-core/3.0.0-M1/jar) |
11+
| simboot-api | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot.boot/simboot-api/3.0.0-M1/jar) |
12+
| simboot-core | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot.boot/simboot-core/3.0.0-M1/jar) |
13+
| simboot-core-annotation | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot.boot/simboot-core-annotation/3.0.0-M1/jar) |
14+
| 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) |
15+
16+
</details>
17+
18+
期间暂无相关反馈,发布 `v3.0.0` 第一个预发布里程碑版本。将会开始逐步完善文档内容。

buildSrc/src/main/kotlin/P.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ sealed class P(override val group: String) : ProjectDetail() {
7676
init {
7777
val mainVersion = version(3, 0, 0)
7878
//
79-
var status = version("beta", 4)
79+
var status = version("M1")
8080
versionWithoutSnapshot = mainVersion - status.copy()
8181
if (isSnapshot()) {
8282
status = status - Version.SNAPSHOT

buildSrc/src/main/kotlin/simbot.changelog-generator.gradle.kts

+19-103
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,12 @@ tasks.create("createChangelog") {
5656
file.createNewFile()
5757

5858
val autoGenerateText = buildString {
59-
appendLine("**仓库参考:**").appendLine()
60-
6159
appendLine("<details>")
6260
appendLine("<summary><b>仓库参考</b></summary>")
6361
appendLine()
6462

65-
appendLine("| **模块** | **repo1.maven** | **search.maven** |")
66-
appendLine("|---------|-----------------|------------------|")
63+
appendLine("| **模块** | **search.maven** |")
64+
appendLine("|---------|------------------|")
6765
repoRowMulti(simbotLoggerKotlin, "simbot-logger", "love.forte.simbot", "simbot-logger", realVersion)
6866
repoRow("simbot-api", "love.forte.simbot", "simbot-api", realVersion)
6967
repoRow("simbot-core", "love.forte.simbot", "simbot-core", realVersion)
@@ -76,116 +74,28 @@ tasks.create("createChangelog") {
7674
appendLine("</details>")
7775
}
7876

79-
// val autoGenerateText0 = """
80-
// **仓库参考:**
81-
//
82-
// | **模块** | **repo1.maven** | **search.maven** |
83-
// |---------|-----------------|------------------|
84-
// ${repoRow("simbot-api", "love.forte.simbot", "simbot-api", realVersion)}
85-
// ${repoRow("simbot-core", "love.forte.simbot", "simbot-core", realVersion)}
86-
// ${repoRow("simbot-logger-jvm", "love.forte.simbot", "simbot-logger-jvm", realVersion)}
87-
// ${repoRow("simbot-logger-js", "love.forte.simbot", "simbot-logger-js", realVersion)}
88-
// ${repoRow("simbot-logger-macosx64", "love.forte.simbot", "simbot-logger-macosx64", realVersion)}
89-
// ${repoRow("simbot-logger-linuxx64", "love.forte.simbot", "simbot-logger-linuxx64", realVersion)}
90-
// ${repoRow("simbot-logger-mingwx64", "love.forte.simbot", "simbot-logger-mingwx64", realVersion)}
91-
// ${repoRow("simboot-api", "love.forte.simbot.boot", "simboot-api", realVersion)}
92-
// ${repoRow("simboot-core", "love.forte.simbot.boot", "simboot-core", realVersion)}
93-
// ${repoRow("simboot-core-annotation", "love.forte.simbot.boot", "simboot-core-annotation", realVersion)}
94-
// ${
95-
// repoRow(
96-
// "simboot-core-spring-boot-starter",
97-
// "love.forte.simbot.boot",
98-
// "simboot-core-spring-boot-starter",
99-
// realVersion
100-
// )
101-
// }
102-
//
103-
//
104-
//
105-
//
106-
// """.trimIndent()
107-
108-
10977
file.writeText(autoGenerateText)
11078
}
111-
112-
/*
113-
**仓库参考:**
114-
115-
* [simbot-api: $version](https://repo1.maven.org/maven2/love/forte/simbot/simbot-api/$realVersion)
116-
* [simbot-core: $version](https://repo1.maven.org/maven2/love/forte/simbot/simbot-core/$realVersion)
117-
* [simbot-logger: $version](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger/$realVersion)
118-
* [simboot-api: $version](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-api/$realVersion)
119-
* [simboot-core: $version](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-core/$realVersion)
120-
* [simboot-core-annotation: $version](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-core-annotation/$realVersion)
121-
* [simboot-core-spring-boot-starter: $version](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-core-spring-boot-starter/$realVersion)
122-
123-
*/
124-
125-
// ## 组件更新
126-
// 相关组件会在后续三日内跟进更新
127-
// - [mirai组件](https://github.com/simple-robot/simbot-component-mirai/releases)
128-
// - [腾讯频道组件](https://github.com/simple-robot/simbot-component-tencent-guild/releases)
129-
// - [开黑啦组件](https://github.com/simple-robot/simbot-component-kaiheila/releases)
130-
13179
}
13280
}
13381

134-
// fun repoRow(moduleName: String, group: String, id: String, version: String): String {
135-
// return "| $moduleName | [$moduleName: v$version](https://repo1.maven.org/maven2/${
136-
// group.replace(
137-
// ".",
138-
// "/"
139-
// )
140-
// }/${
141-
// id.replace(
142-
// ".",
143-
// "/"
144-
// )
145-
// }/$version) | [$moduleName: v$version](https://search.maven.org/artifact/$group/$id/$version/jar) |"
146-
// }
147-
//
148-
// fun repoRowMulti(
149-
// kotlin: KotlinMultiplatformExtension,
150-
// moduleName: String,
151-
// group: String,
152-
// id: String,
153-
// version: String,
154-
// ): String {
155-
// kotlin.targets.forEach {
156-
// println("simbot-logger target: $it")
157-
// }
158-
//
159-
// return repoRow(moduleName, group, id, version)
160-
// }
16182

16283

16384
fun StringBuilder.repoRow(moduleName: String, group: String, id: String, version: String) {
164-
append("| ").append(moduleName).append(" | [").append(moduleName).append(": v").append(version)
165-
append("](https://repo1.maven.org/maven2/")
166-
append(group.replace(".", "/"))
167-
append('/')
168-
append(id.replace(".", "/"))
169-
append('/')
170-
append(version)
171-
append(") | [")
172-
append(moduleName).append(": v").append(version)
85+
append("| ").append(moduleName)
86+
append(" | [")
87+
append("v").append(version)
17388
append("](https://search.maven.org/artifact/")
17489
append(group).append("/").append(id).append("/").append(version).append("/jar) |")
17590
appendLine()
176-
// "| $moduleName | [$moduleName: v$version](https://repo1.maven.org/maven2/${
177-
// group.replace(
178-
// ".",
179-
// "/"
180-
// )
181-
// }/${
182-
// id.replace(
183-
// ".",
184-
// "/"
185-
// )
186-
// }/$version) | [$moduleName: v$version](https://search.maven.org/artifact/$group/$id/$version/jar) |"
18791
}
18892

93+
private val multiPlatformType = setOf(
94+
KotlinPlatformType.common,
95+
KotlinPlatformType.jvm,
96+
KotlinPlatformType.js,
97+
)
98+
18999
fun StringBuilder.repoRowMulti(
190100
kotlin: KotlinMultiplatformExtension,
191101
moduleName: String,
@@ -194,11 +104,17 @@ fun StringBuilder.repoRowMulti(
194104
version: String,
195105
) {
196106
kotlin.targets.filter {
197-
it.platformType != KotlinPlatformType.common
107+
it.platformType in multiPlatformType
198108
}.sortedBy {
199109
it.platformType
200110
}.forEach {
201-
repoRow("$moduleName-${it.targetName}", group, "$id-${it.targetName.toLowerCase()}", version)
111+
when (it.platformType) {
112+
KotlinPlatformType.common ->
113+
repoRow("$moduleName", group, id, version)
114+
else ->
115+
repoRow("$moduleName-${it.targetName}", group, "$id-${it.targetName.toLowerCase()}", version)
116+
}
117+
202118
}
203119

204120
}

0 commit comments

Comments
 (0)