Skip to content

Commit c1c52d8

Browse files
committed
更新simbot到4.0.0-RC3, Kotlin到2.0.0
1 parent 413f326 commit c1c52d8

File tree

11 files changed

+211
-247
lines changed

11 files changed

+211
-247
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
@@ -110,7 +110,7 @@ jobs:
110110
gradle-version: 8.5
111111
arguments: |
112112
publishToSonatype
113-
closeAndReleaseStagingRepository
113+
closeAndReleaseStagingRepositories
114114
--info
115115
--warning-mode all
116116
-x test

.github/workflows/publish-snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
- uses: gradle/actions/setup-gradle@v3
5858

5959
- name: Gradle test and publish snapshot
60-
run: gradle allTests publishToSonatype closeAndReleaseStagingRepository --info --warning-mode all "-Porg.gradle.daemon=false" "-Porg.gradle.jvmargs='-Xmx8g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8'"
60+
run: gradle allTests publishToSonatype closeAndReleaseStagingRepositories --info --warning-mode all "-Porg.gradle.daemon=false" "-Porg.gradle.jvmargs='-Xmx8g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8'"
6161

6262
- name: Upload test reports
6363
uses: actions/upload-artifact@v4

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,5 @@ fabric.properties
158158
.idea/caches/build_file_checksums.ser
159159

160160
generated-docs
161+
162+
.kotlin

buildSrc/build.gradle.kts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ dependencies {
3434
implementation(libs.bundles.dokka)
3535

3636
// see https://github.com/gradle-nexus/publish-plugin
37-
implementation("io.github.gradle-nexus:publish-plugin:1.1.0")
37+
implementation("io.github.gradle-nexus:publish-plugin:2.0.0")
3838

3939
// simbot suspend transform gradle common
4040
implementation(libs.simbot.gradle)
@@ -46,8 +46,3 @@ dependencies {
4646
implementation(libs.bundles.gradle.common)
4747
}
4848

49-
//tasks.withType<KotlinCompile> {
50-
// kotlinOptions {
51-
// languageVersion = "2.0"
52-
// }
53-
//}

buildSrc/src/main/kotlin/JsConfig.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ inline fun Project.configWasmJsTest(block: () -> Unit = {}) {
9797
// see https://youtrack.jetbrains.com/issue/KT-63014/Running-tests-with-wasmJs-in-1.9.20-requires-Chrome-Canary#focus=Comments-27-8321383.0-0
9898
rootProject.the<NodeJsRootExtension>().apply {
9999
// nodeVersion = "21.0.0-v8-canary202309143a48826a08"
100-
nodeVersion = "21.0.0-v8-canary202309143a48826a08"
101-
nodeDownloadBaseUrl = "https://nodejs.org/download/v8-canary"
100+
version = "21.0.0-v8-canary202309143a48826a08"
101+
downloadBaseUrl = "https://nodejs.org/download/v8-canary"
102102
}
103103

104104
tasks.withType<org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask>().configureEach {

buildSrc/src/main/kotlin/JvmConfig.kt

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,22 @@ import org.gradle.kotlin.dsl.get
2323
import org.gradle.kotlin.dsl.getByName
2424
import org.gradle.kotlin.dsl.withType
2525
import org.gradle.process.CommandLineArgumentProvider
26+
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
2627
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2728
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
2829
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
2930
import org.jetbrains.kotlin.gradle.dsl.KotlinTopLevelExtension
3031
import org.jetbrains.kotlin.gradle.targets.jvm.KotlinJvmTarget
3132

3233

34+
@OptIn(ExperimentalKotlinGradlePluginApi::class)
3335
inline fun KotlinJvmTarget.configJava(crossinline block: KotlinJvmTarget.() -> Unit = {}) {
3436
withJava()
35-
compilations.all {
36-
kotlinOptions {
37-
javaParameters = true
38-
freeCompilerArgs = freeCompilerArgs + listOf("-Xjvm-default=all")
39-
}
37+
compilerOptions {
38+
javaParameters = true
39+
freeCompilerArgs.addAll(
40+
"-Xjvm-default=all"
41+
)
4042
}
4143

4244
testRuns["test"].executionTask.configure {
@@ -68,8 +70,7 @@ inline fun KotlinJvmProjectExtension.configKotlinJvm(
6870
compilerOptions {
6971
javaParameters = true
7072
jvmTarget.set(JvmTarget.fromTarget(jdkVersion.toString()))
71-
// freeCompilerArgs.addAll("-Xjvm-default=all", "-Xjsr305=strict")
72-
freeCompilerArgs.set(freeCompilerArgs.getOrElse(emptyList()) + listOf("-Xjvm-default=all", "-Xjsr305=strict"))
73+
freeCompilerArgs.addAll("-Xjvm-default=all", "-Xjsr305=strict")
7374
}
7475
block()
7576
}
@@ -85,10 +86,12 @@ inline fun Project.configJavaCompileWithModule(
8586
targetCompatibility = jvmVersion
8687

8788
if (moduleName != null) {
88-
options.compilerArgumentProviders.add(CommandLineArgumentProvider {
89-
// Provide compiled Kotlin classes to javac – needed for Java/Kotlin mixed sources to work
90-
listOf("--patch-module", "$moduleName=${sourceSets["main"].output.asPath}")
91-
})
89+
options.compilerArgumentProviders.add(
90+
CommandLineArgumentProvider {
91+
// Provide compiled Kotlin classes to javac – needed for Java/Kotlin mixed sources to work
92+
listOf("--patch-module", "$moduleName=${sourceSets["main"].output.asPath}")
93+
}
94+
)
9295
}
9396

9497
block()

gradle/libs.versions.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
[versions]
2-
kotlin = "1.9.22"
3-
kotlinx-coroutines = "1.8.0"
4-
kotlinx-serialization = "1.6.2"
2+
kotlin = "2.0.0"
3+
kotlinx-coroutines = "1.8.1"
4+
kotlinx-serialization = "1.6.3"
55
kotlinx-datetime = "0.5.0"
66
dokka = "1.9.20"
77
okio = "3.3.0"
8-
ktor = "2.3.7"
8+
ktor = "2.3.8"
99
openjdk-jmh = "1.35"
1010
log4j = "2.20.0"
1111
reactor = "3.6.2"
1212
# simbot
13-
simbot = "4.0.0-beta3"
14-
suspendTransform = "0.6.0"
15-
gradleCommon = "0.2.0"
13+
simbot = "4.0.0-RC3"
14+
suspendTransform = "0.8.0-beta1"
15+
gradleCommon = "0.4.0"
1616
# ksp
17-
ksp = "1.9.22-1.0.17"
17+
ksp = "2.0.0-1.0.22"
1818
# https://square.github.io/kotlinpoet/
19-
kotlinPoet = "1.16.0"
19+
kotlinPoet = "1.17.0"
2020
# https://mockk.io/
2121
mockk = "1.13.10"
2222
# https://detekt.dev/docs/intro

0 commit comments

Comments
 (0)