Skip to content

Commit

Permalink
release: v3.0.0-beta.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ForteScarlet committed Oct 19, 2022
1 parent 37a1e37 commit d1376a8
Show file tree
Hide file tree
Showing 7 changed files with 202 additions and 43 deletions.
44 changes: 44 additions & 0 deletions .changelog/v3.0.0-beta.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
**仓库参考:**

<details>
<summary><b>仓库参考</b></summary>

| **模块** | **repo1.maven** | **search.maven** |
|---------|-----------------|------------------|
| simbot-logger-androidNativeArm32 | [simbot-logger-androidNativeArm32: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-androidnativearm32/3.0.0-beta.3) | [simbot-logger-androidNativeArm32: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-androidnativearm32/3.0.0-beta.3/jar) |
| simbot-logger-androidNativeArm64 | [simbot-logger-androidNativeArm64: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-androidnativearm64/3.0.0-beta.3) | [simbot-logger-androidNativeArm64: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-androidnativearm64/3.0.0-beta.3/jar) |
| simbot-logger-androidNativeX64 | [simbot-logger-androidNativeX64: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-androidnativex64/3.0.0-beta.3) | [simbot-logger-androidNativeX64: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-androidnativex64/3.0.0-beta.3/jar) |
| simbot-logger-androidNativeX86 | [simbot-logger-androidNativeX86: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-androidnativex86/3.0.0-beta.3) | [simbot-logger-androidNativeX86: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-androidnativex86/3.0.0-beta.3/jar) |
| simbot-logger-iosArm32 | [simbot-logger-iosArm32: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-iosarm32/3.0.0-beta.3) | [simbot-logger-iosArm32: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-iosarm32/3.0.0-beta.3/jar) |
| simbot-logger-iosArm64 | [simbot-logger-iosArm64: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-iosarm64/3.0.0-beta.3) | [simbot-logger-iosArm64: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-iosarm64/3.0.0-beta.3/jar) |
| simbot-logger-iosSimulatorArm64 | [simbot-logger-iosSimulatorArm64: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-iossimulatorarm64/3.0.0-beta.3) | [simbot-logger-iosSimulatorArm64: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-iossimulatorarm64/3.0.0-beta.3/jar) |
| simbot-logger-iosX64 | [simbot-logger-iosX64: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-iosx64/3.0.0-beta.3) | [simbot-logger-iosX64: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-iosx64/3.0.0-beta.3/jar) |
| simbot-logger-js | [simbot-logger-js: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-js/3.0.0-beta.3) | [simbot-logger-js: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-js/3.0.0-beta.3/jar) |
| simbot-logger-jvm | [simbot-logger-jvm: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-jvm/3.0.0-beta.3) | [simbot-logger-jvm: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-jvm/3.0.0-beta.3/jar) |
| simbot-logger-linuxArm32Hfp | [simbot-logger-linuxArm32Hfp: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-linuxarm32hfp/3.0.0-beta.3) | [simbot-logger-linuxArm32Hfp: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-linuxarm32hfp/3.0.0-beta.3/jar) |
| simbot-logger-linuxArm64 | [simbot-logger-linuxArm64: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-linuxarm64/3.0.0-beta.3) | [simbot-logger-linuxArm64: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-linuxarm64/3.0.0-beta.3/jar) |
| simbot-logger-linuxMips32 | [simbot-logger-linuxMips32: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-linuxmips32/3.0.0-beta.3) | [simbot-logger-linuxMips32: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-linuxmips32/3.0.0-beta.3/jar) |
| simbot-logger-linuxMipsel32 | [simbot-logger-linuxMipsel32: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-linuxmipsel32/3.0.0-beta.3) | [simbot-logger-linuxMipsel32: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-linuxmipsel32/3.0.0-beta.3/jar) |
| simbot-logger-linuxX64 | [simbot-logger-linuxX64: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-linuxx64/3.0.0-beta.3) | [simbot-logger-linuxX64: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-linuxx64/3.0.0-beta.3/jar) |
| simbot-logger-macosArm64 | [simbot-logger-macosArm64: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-macosarm64/3.0.0-beta.3) | [simbot-logger-macosArm64: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-macosarm64/3.0.0-beta.3/jar) |
| simbot-logger-macosX64 | [simbot-logger-macosX64: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-macosx64/3.0.0-beta.3) | [simbot-logger-macosX64: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-macosx64/3.0.0-beta.3/jar) |
| simbot-logger-metadata | [simbot-logger-metadata: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-metadata/3.0.0-beta.3) | [simbot-logger-metadata: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-metadata/3.0.0-beta.3/jar) |
| simbot-logger-mingwX64 | [simbot-logger-mingwX64: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-mingwx64/3.0.0-beta.3) | [simbot-logger-mingwX64: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-mingwx64/3.0.0-beta.3/jar) |
| simbot-logger-mingwX86 | [simbot-logger-mingwX86: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-mingwx86/3.0.0-beta.3) | [simbot-logger-mingwX86: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-mingwx86/3.0.0-beta.3/jar) |
| simbot-logger-tvosArm64 | [simbot-logger-tvosArm64: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-tvosarm64/3.0.0-beta.3) | [simbot-logger-tvosArm64: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-tvosarm64/3.0.0-beta.3/jar) |
| simbot-logger-tvosSimulatorArm64 | [simbot-logger-tvosSimulatorArm64: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-tvossimulatorarm64/3.0.0-beta.3) | [simbot-logger-tvosSimulatorArm64: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-tvossimulatorarm64/3.0.0-beta.3/jar) |
| simbot-logger-tvosX64 | [simbot-logger-tvosX64: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-tvosx64/3.0.0-beta.3) | [simbot-logger-tvosX64: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-tvosx64/3.0.0-beta.3/jar) |
| simbot-logger-wasm32 | [simbot-logger-wasm32: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-wasm32/3.0.0-beta.3) | [simbot-logger-wasm32: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-wasm32/3.0.0-beta.3/jar) |
| simbot-logger-watchosArm32 | [simbot-logger-watchosArm32: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-watchosarm32/3.0.0-beta.3) | [simbot-logger-watchosArm32: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-watchosarm32/3.0.0-beta.3/jar) |
| simbot-logger-watchosArm64 | [simbot-logger-watchosArm64: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-watchosarm64/3.0.0-beta.3) | [simbot-logger-watchosArm64: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-watchosarm64/3.0.0-beta.3/jar) |
| simbot-logger-watchosSimulatorArm64 | [simbot-logger-watchosSimulatorArm64: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-watchossimulatorarm64/3.0.0-beta.3) | [simbot-logger-watchosSimulatorArm64: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-watchossimulatorarm64/3.0.0-beta.3/jar) |
| simbot-logger-watchosX64 | [simbot-logger-watchosX64: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-watchosx64/3.0.0-beta.3) | [simbot-logger-watchosX64: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-watchosx64/3.0.0-beta.3/jar) |
| simbot-logger-watchosX86 | [simbot-logger-watchosX86: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger-watchosx86/3.0.0-beta.3) | [simbot-logger-watchosX86: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-watchosx86/3.0.0-beta.3/jar) |
| simbot-api | [simbot-api: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-api/3.0.0-beta.3) | [simbot-api: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-api/3.0.0-beta.3/jar) |
| simbot-core | [simbot-core: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/simbot-core/3.0.0-beta.3) | [simbot-core: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot/simbot-core/3.0.0-beta.3/jar) |
| simboot-api | [simboot-api: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-api/3.0.0-beta.3) | [simboot-api: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot.boot/simboot-api/3.0.0-beta.3/jar) |
| simboot-core | [simboot-core: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-core/3.0.0-beta.3) | [simboot-core: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot.boot/simboot-core/3.0.0-beta.3/jar) |
| simboot-core-annotation | [simboot-core-annotation: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-core-annotation/3.0.0-beta.3) | [simboot-core-annotation: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot.boot/simboot-core-annotation/3.0.0-beta.3/jar) |
| simboot-core-spring-boot-starter | [simboot-core-spring-boot-starter: v3.0.0-beta.3](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-core-spring-boot-starter/3.0.0-beta.3) | [simboot-core-spring-boot-starter: v3.0.0-beta.3](https://search.maven.org/artifact/love.forte.simbot.boot/simboot-core-spring-boot-starter/3.0.0-beta.3/jar) |

</details>
4 changes: 3 additions & 1 deletion buildSrc/src/main/kotlin/P.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
@file:Suppress("unused")

import love.forte.gradle.common.core.project.*
import org.jetbrains.kotlin.konan.target.HostManager
import org.jetbrains.kotlin.konan.target.KonanTarget

/*
* Copyright (c) 2021-2022 ForteScarlet <ForteScarlet@163.com>
Expand Down Expand Up @@ -74,7 +76,7 @@ sealed class P(override val group: String) : ProjectDetail() {
init {
val mainVersion = version(3, 0, 0)
//
var status = version("beta", 3) - version("dev", 10)
var status = version("beta", 3)
versionWithoutSnapshot = mainVersion - status.copy()
if (isSnapshot()) {
status = status - Version.SNAPSHOT
Expand Down
175 changes: 141 additions & 34 deletions buildSrc/src/main/kotlin/simbot.changelog-generator.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright (c) 2022 ForteScarlet <ForteScarlet@163.com>
*
* 本文件是 simply-robot (或称 simple-robot 3.x 、simbot 3.x ) 的一部分。
*
* simply-robot 是自由软件:你可以再分发之和/或依照由自由软件基金会发布的 GNU 通用公共许可证修改之,无论是版本 3 许可证,还是(按你的决定)任何以后版都可以。
*
* 发布 simply-robot 是希望它能有用,但是并无保障;甚至连可销售和符合某个特定的目的都不保证。请参看 GNU 通用公共许可证,了解详情。
*
* 你应该随程序获得一份 GNU 通用公共许可证的复本。如果没有,请看:
* https://www.gnu.org/licenses
* https://www.gnu.org/licenses/gpl-3.0-standalone.html
* https://www.gnu.org/licenses/lgpl-3.0-standalone.html
*
*/

import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType

/*
* Copyright (c) 2022-2022 ForteScarlet <ForteScarlet@163.com>
*
Expand All @@ -17,7 +36,7 @@


tasks.create("createChangelog") {
group = "build"
group = "documentation"
doFirst {
val realVersion = rootProject.version.toString()
val version = "v$realVersion"
Expand All @@ -26,33 +45,65 @@ tasks.create("createChangelog") {
val changelogDir = rootProject.file(".changelog").also {
it.mkdirs()
}

val simbotLoggerKotlin =
project(":simbot-logger").extensions.getByName<KotlinMultiplatformExtension>(
"kotlin"
)

val file = File(changelogDir, "$version.md")
if (!file.exists()) {
file.createNewFile()
val autoGenerateText = """
**仓库参考:**
| **模块** | **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", "love.forte.simbot", "simbot-logger", 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
)
}

val autoGenerateText = buildString {
appendLine("**仓库参考:**").appendLine()

appendLine("<details>")
appendLine("<summary><b>仓库参考</b></summary>")
appendLine()

appendLine("| **模块** | **repo1.maven** | **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)
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()
appendLine()
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)
Expand Down Expand Up @@ -80,16 +131,72 @@ tasks.create("createChangelog") {
}
}

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 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("](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) |"
}

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)
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import love.forte.plugin.suspendtrans.SuspendTransformConfiguration

plugins {
id("love.forte.plugin.suspend-transform")

}

suspendTransform {
Expand Down
Loading

0 comments on commit d1376a8

Please sign in to comment.