Skip to content

Commit 8a75313

Browse files
lppeddftomassetti
authored andcommitted
build: bump Kotlin to 2.2.20-RC2 and update dependencies
1 parent c45ce60 commit 8a75313

File tree

9 files changed

+353
-244
lines changed

9 files changed

+353
-244
lines changed

antlr-kotlin-runtime/build.gradle.kts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import com.strumenta.antlrkotlin.gradle.ext.setupPom
22
import com.strumenta.antlrkotlin.gradle.ext.targetsNative
3-
import com.vanniktech.maven.publish.SonatypeHost
4-
import org.jetbrains.dokka.Platform
5-
import org.jetbrains.dokka.gradle.DokkaTask
3+
import org.jetbrains.dokka.gradle.engine.parameters.KotlinPlatform
64

75
plugins {
86
id("strumenta.multiplatform")
@@ -41,19 +39,19 @@ mavenPublishing {
4139
)
4240

4341
setupPom(project, projectDescription = "Runtime for ANTLR Kotlin")
44-
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, true)
42+
publishToMavenCentral(true)
4543
signAllPublications()
4644
}
4745

48-
tasks.withType<DokkaTask>().configureEach {
46+
dokka {
4947
dokkaSourceSets {
5048
configureEach {
5149
suppress = true
5250
}
5351

54-
val commonMain by getting {
52+
commonMain.configure {
5553
suppress = false
56-
platform = Platform.jvm
54+
analysisPlatform = KotlinPlatform.JVM
5755
}
5856
}
5957
}

antlr-kotlin-runtime/src/wasmWasiMain/kotlin/com/strumenta/antlrkotlin/runtime/Console.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Copyright 2024-present Strumenta and contributors, licensed under BSD 3-Clause.
33
package com.strumenta.antlrkotlin.runtime
44

5-
import kotlin.wasm.WasmImport
65
import kotlin.wasm.unsafe.UnsafeWasmMemoryApi
76
import kotlin.wasm.unsafe.withScopedMemoryAllocator
87

@@ -15,6 +14,7 @@ internal actual fun platformPrintErrLn(message: String): Unit =
1514
internal actual fun platformPrintErr(message: String): Unit =
1615
wasiPrintErr(message, lineFeed = false)
1716

17+
@OptIn(ExperimentalWasmInterop::class)
1818
@WasmImport("wasi_snapshot_preview1", "fd_write")
1919
private external fun fdWrite(descriptor: Int, scatterPtr: Int, scatterSize: Int, errorPtr: Int): Int
2020

antlr-kotlin-runtime/src/wasmWasiMain/kotlin/com/strumenta/antlrkotlin/runtime/Environment.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@
22
// Copyright 2024-present Strumenta and contributors, licensed under BSD 3-Clause.
33
package com.strumenta.antlrkotlin.runtime
44

5-
import kotlin.wasm.WasmImport
65
import kotlin.wasm.unsafe.Pointer
76
import kotlin.wasm.unsafe.UnsafeWasmMemoryApi
87
import kotlin.wasm.unsafe.withScopedMemoryAllocator
98

109
/**
1110
* See [environ_sizes_get](https://wasix.org/docs/api-reference/wasi/environ_sizes_get).
1211
*/
12+
@OptIn(ExperimentalWasmInterop::class)
1313
@WasmImport("wasi_snapshot_preview1", "environ_sizes_get")
1414
private external fun wasiRawEnvironSizesGet(environCountPtr: Int, environBufSizePtr: Int): Int
1515

1616
/**
1717
* See [environ_get](https://wasix.org/docs/api-reference/wasi/environ_get).
1818
*/
19+
@OptIn(ExperimentalWasmInterop::class)
1920
@WasmImport("wasi_snapshot_preview1", "environ_get")
2021
private external fun wasiRawEnvironGet(environPtr: Int, environBufPtr: Int): Int
2122

antlr-kotlin-target/build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import com.strumenta.antlrkotlin.gradle.ext.setupPom
2-
import com.vanniktech.maven.publish.SonatypeHost
32

43
plugins {
54
id("strumenta.jvm.library")
@@ -18,7 +17,7 @@ mavenPublishing {
1817
)
1918

2019
setupPom(project, projectDescription = "Kotlin target for ANTLR")
21-
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, true)
20+
publishToMavenCentral(true)
2221
signAllPublications()
2322
}
2423

buildSrc/src/main/kotlin/com/strumenta/antlrkotlin/gradle/plugins/StrumentaGradlePluginModulePlugin.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ class StrumentaGradlePluginModulePlugin : Plugin<Project> {
2727
val kotlin = project.kotlinJvmExtension
2828
kotlin.explicitApiWarning()
2929
kotlin.compilerOptions {
30-
apiVersion.set(KotlinVersion.KOTLIN_2_1)
31-
languageVersion.set(KotlinVersion.KOTLIN_2_1)
30+
apiVersion.set(KotlinVersion.KOTLIN_2_2)
31+
languageVersion.set(KotlinVersion.KOTLIN_2_2)
3232

3333
jvmTarget.set(JvmTarget.JVM_1_8)
3434
freeCompilerArgs.add("-Xjvm-default=all")

buildSrc/src/main/kotlin/com/strumenta/antlrkotlin/gradle/plugins/StrumentaJvmLibraryModulePlugin.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class StrumentaJvmLibraryModulePlugin : Plugin<Project> {
2222
val kotlin = project.kotlinJvmExtension
2323
kotlin.explicitApiWarning()
2424
kotlin.compilerOptions {
25-
apiVersion.set(KotlinVersion.KOTLIN_2_1)
26-
languageVersion.set(KotlinVersion.KOTLIN_2_1)
25+
apiVersion.set(KotlinVersion.KOTLIN_2_2)
26+
languageVersion.set(KotlinVersion.KOTLIN_2_2)
2727

2828
jvmTarget.set(JvmTarget.JVM_1_8)
2929
freeCompilerArgs.add("-Xjvm-default=all")

buildSrc/src/main/kotlin/com/strumenta/antlrkotlin/gradle/plugins/StrumentaMultiplatformModulePlugin.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ class StrumentaMultiplatformModulePlugin : Plugin<Project> {
3535
val kmp = project.kmpExtension
3636
kmp.explicitApiWarning()
3737
kmp.compilerOptions {
38-
apiVersion.set(KotlinVersion.KOTLIN_2_1)
39-
languageVersion.set(KotlinVersion.KOTLIN_2_1)
38+
apiVersion.set(KotlinVersion.KOTLIN_2_2)
39+
languageVersion.set(KotlinVersion.KOTLIN_2_2)
4040
freeCompilerArgs.add("-Xexpect-actual-classes")
4141
}
4242
}

gradle/libs.versions.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[versions]
2-
kotlin = "2.1.20"
3-
kotlinx-io = "0.7.0"
2+
kotlin = "2.2.20-RC2"
3+
kotlinx-io = "0.8.0"
44
kotlinx-benchmark = "0.4.14"
5-
kotlinx-resources = "0.10.0"
5+
kotlinx-resources = "0.10.1"
66
antlr4 = "4.13.1"
7-
dokka = "1.9.20"
7+
dokka = "2.1.0-Beta"
88
researchgate-release = "3.1.0"
9-
maven-publish = "0.32.0"
10-
gradle-plugin-publish = "1.3.0"
9+
maven-publish = "0.34.0"
10+
gradle-plugin-publish = "2.0.0"
1111
antlr-kotlin = "1.0.5"
1212

1313
[libraries]

0 commit comments

Comments
 (0)