Skip to content

Commit 91cd53e

Browse files
authored
Merge pull request #145 from simple-robot/dev/update-simbot-and-KT
更新simbot到v4.0.0-RC3, Kotlin到2.0.0
2 parents f4c910c + 2a22a59 commit 91cd53e

File tree

90 files changed

+232
-11202
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+232
-11202
lines changed

.github/workflows/publish-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
gradle-version: 8.5
5151
arguments: |
5252
publishToSonatype
53-
closeAndReleaseStagingRepository
53+
closeAndReleaseStagingRepositories
5454
--info
5555
--warning-mode all
5656
-x test
@@ -108,7 +108,7 @@ jobs:
108108
uses: gradle/actions/setup-gradle@v3
109109
with:
110110
gradle-version: 8.5
111-
arguments: clean test publishToSonatype closeAndReleaseStagingRepository
111+
arguments: clean test publishToSonatype closeAndReleaseStagingRepositories
112112
env:
113113
SIMBOT_IS_SNAPSHOT: true
114114
SIMBOT_SNAPSHOT_ONLY: true

.github/workflows/publish-snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
arguments: |
5959
test
6060
publishToSonatype
61-
closeAndReleaseStagingRepository
61+
closeAndReleaseStagingRepositories
6262
--info
6363
--warning-mode all
6464
-Porg.gradle.jvmargs="-Xmx8g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"

.github/workflows/publish-v4-release.yml.bk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
gradle-version: 8.5
4747
arguments: |
4848
publishToSonatype
49-
closeAndReleaseStagingRepository
49+
closeAndReleaseStagingRepositories
5050
--info
5151
--warning-mode all
5252
-x test
@@ -99,7 +99,7 @@ jobs:
9999
uses: gradle/gradle-build-action@v3
100100
with:
101101
gradle-version: 8.5
102-
arguments: clean test publishToSonatype closeAndReleaseStagingRepository
102+
arguments: clean test publishToSonatype closeAndReleaseStagingRepositories
103103
env:
104104
SIMBOT_IS_SNAPSHOT: true
105105
SIMBOT_SNAPSHOT_ONLY: true

.github/workflows/publish-v4-snapshot.yml.bk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
arguments: |
5959
test
6060
publishToSonatype
61-
closeAndReleaseStagingRepository
61+
closeAndReleaseStagingRepositories
6262
--info
6363
--warning-mode all
6464
-Porg.gradle.jvmargs="-Xmx8g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,3 +151,4 @@ gradle-app.setting
151151

152152
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
153153

154+
.kotlin

buildSrc/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dependencies {
3636
implementation(libs.bundles.dokka)
3737

3838
// see https://github.com/gradle-nexus/publish-plugin
39-
implementation("io.github.gradle-nexus:publish-plugin:1.3.0")
39+
implementation("io.github.gradle-nexus:publish-plugin:2.0.0")
4040

4141
// simbot suspend transform gradle common
4242
implementation(libs.simbot.gradle)

buildSrc/src/main/kotlin/JvmConfig.kt

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
/*
2-
* Copyright (c) 2024. ForteScarlet.
2+
* Copyright (c) 2024. ForteScarlet.
33
*
4-
* This file is part of simbot-component-qq-guild.
4+
* This file is part of simbot-component-kook.
55
*
6-
* simbot-component-qq-guild is free software: you can redistribute it and/or modify it under the terms
7-
* of the GNU Lesser General Public License as published by the Free Software Foundation,
8-
* either version 3 of the License, or (at your option) any later version.
6+
* simbot-component-kook is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU Lesser General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
910
*
10-
* simbot-component-qq-guild is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12-
* See the GNU Lesser General Public License for more details.
11+
* simbot-component-kook is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU Lesser General Public License for more details.
1315
*
14-
* You should have received a copy of the GNU Lesser General Public License along with simbot-component-qq-guild.
15-
* If not, see <https://www.gnu.org/licenses/>.
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with simbot-component-kook,
18+
* If not, see <https://www.gnu.org/licenses/>.
1619
*/
1720

1821
import org.gradle.api.Project
@@ -23,20 +26,22 @@ import org.gradle.kotlin.dsl.get
2326
import org.gradle.kotlin.dsl.getByName
2427
import org.gradle.kotlin.dsl.withType
2528
import org.gradle.process.CommandLineArgumentProvider
29+
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
2630
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2731
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
2832
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
2933
import org.jetbrains.kotlin.gradle.dsl.KotlinTopLevelExtension
3034
import org.jetbrains.kotlin.gradle.targets.jvm.KotlinJvmTarget
3135

3236

37+
@OptIn(ExperimentalKotlinGradlePluginApi::class)
3338
inline fun KotlinJvmTarget.configJava(crossinline block: KotlinJvmTarget.() -> Unit = {}) {
3439
withJava()
35-
compilations.all {
36-
kotlinOptions {
37-
javaParameters = true
38-
freeCompilerArgs = freeCompilerArgs + listOf("-Xjvm-default=all")
39-
}
40+
compilerOptions {
41+
javaParameters = true
42+
freeCompilerArgs.addAll(
43+
"-Xjvm-default=all"
44+
)
4045
}
4146

4247
testRuns["test"].executionTask.configure {

buildSrc/src/main/kotlin/K2Config.kt

Lines changed: 0 additions & 30 deletions
This file was deleted.

buildSrc/src/main/kotlin/P.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ object P : ProjectDetail() {
5252
override val homepage: String
5353
get() = HOMEPAGE
5454

55-
private val baseVersion = v(4, 0, 0) - v("beta2")
55+
private val baseVersion = v(4, 0, 0) - v("beta3")
5656

5757
val snapshotVersion = baseVersion - Version.SNAPSHOT
5858
override val version = if (isSnapshot()) snapshotVersion else baseVersion

buildSrc/src/main/kotlin/simbot-kook-module-conventions.gradle.kts

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
/*
2-
* Copyright (c) 2022-2023. ForteScarlet.
2+
* Copyright (c) 2022-2024. ForteScarlet.
33
*
4-
* This file is part of simbot-component-kook.
4+
* This file is part of simbot-component-kook.
55
*
6-
* simbot-component-kook is free software: you can redistribute it and/or modify it under the terms of
7-
* the GNU Lesser General Public License as published by the Free Software Foundation,
8-
* either version 3 of the License, or (at your option) any later version.
6+
* simbot-component-kook is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU Lesser General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
910
*
10-
* simbot-component-kook is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12-
* See the GNU Lesser General Public License for more details.
11+
* simbot-component-kook is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU Lesser General Public License for more details.
1315
*
14-
* You should have received a copy of the GNU Lesser General Public License along with simbot-component-kook,
15-
* If not, see <https://www.gnu.org/licenses/>.
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with simbot-component-kook,
18+
* If not, see <https://www.gnu.org/licenses/>.
1619
*/
1720

1821
import love.forte.gradle.common.core.project.setup
@@ -69,10 +72,11 @@ tasks.getByName<Test>("test") {
6972
}
7073

7174
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
72-
kotlinOptions {
75+
compilerOptions {
7376
javaParameters = true
74-
// jvmTarget = "1.8"
75-
freeCompilerArgs = freeCompilerArgs + listOf("-Xjvm-default=all")
77+
freeCompilerArgs.addAll(
78+
"-Xjvm-default=all"
79+
)
7680
}
7781
}
7882

gradle/libs.versions.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
[versions]
2-
kotlin = "1.9.22"
3-
kotlinx-coroutines = "1.8.0"
2+
kotlin = "2.0.0"
3+
kotlinx-coroutines = "1.8.1"
44
kotlinx-serialization = "1.6.3"
5-
dokka = "1.9.10"
5+
dokka = "1.9.20"
66
openjdk-jmh = "1.37"
77
ktor = "2.3.8"
88
log4j = "2.23.0"
99
# simbot
10-
simbot = "4.0.0-beta1"
11-
suspendTransform = "0.6.0"
12-
gradleCommon = "0.2.0"
10+
simbot = "4.0.0-RC3"
11+
suspendTransform = "0.8.0-beta1"
12+
gradleCommon = "0.4.0"
1313
# ksp
14-
ksp = "1.9.22-1.0.18"
14+
ksp = "2.0.0-1.0.22"
1515
# https://square.github.io/kotlinpoet/
16-
kotlinPoet = "1.16.0"
16+
kotlinPoet = "1.17.0"
1717

1818
[libraries]
1919
# simbot

0 commit comments

Comments
 (0)