Skip to content

Commit 7c01e04

Browse files
authored
Upgrade to Kotlin 1.9.0 (#307)
* Upgrade to Kotlin 1.9.0 * Upgrade resources library to 0.4.0
1 parent b85c50e commit 7c01e04

File tree

6 files changed

+12
-2
lines changed

6 files changed

+12
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.xebia.functional.xef.env
22

3+
import kotlinx.cinterop.ExperimentalForeignApi
34
import kotlinx.cinterop.toKString
45

6+
@OptIn(ExperimentalForeignApi::class)
57
actual fun getenv(name: String): String? = platform.posix.getenv(name)?.toKString()

filesystem/src/linuxX64Main/kotlin/com/xebia/functional/xef/io/LinuxCommandExecutor.kt

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.xebia.functional.xef.io
22

33

4+
import kotlinx.cinterop.ExperimentalForeignApi
45
import kotlinx.cinterop.refTo
56
import kotlinx.cinterop.toKString
67
import platform.posix.*
@@ -13,6 +14,7 @@ object LinuxCommandExecutor : CommandExecutor {
1314
/**
1415
* https://stackoverflow.com/questions/57123836/kotlin-native-execute-command-and-get-the-output
1516
*/
17+
@OptIn(ExperimentalForeignApi::class)
1618
override suspend fun executeCommandAndCaptureOutput(
1719
command: List<String>,
1820
options: ExecuteCommandOptions

filesystem/src/macosX64Main/kotlin/com/xebia/functional/xef/io/MacosCommandExecutor.kt

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.xebia.functional.xef.io
22

3+
import kotlinx.cinterop.ExperimentalForeignApi
34
import kotlinx.cinterop.refTo
45
import kotlinx.cinterop.toKString
56
import platform.posix.*
@@ -12,6 +13,7 @@ object MacosCommandExecutor : CommandExecutor {
1213
/**
1314
* https://stackoverflow.com/questions/57123836/kotlin-native-execute-command-and-get-the-output
1415
*/
16+
@OptIn(ExperimentalForeignApi::class)
1517
override suspend fun executeCommandAndCaptureOutput(command: List<String>, options: ExecuteCommandOptions): String {
1618
chdir(options.directory)
1719
val commandToExecute = command.joinToString(separator = " ") { arg ->

filesystem/src/mingwX64Main/kotlin/com/xebia/functional/xef/io/WindowsCommandExecutor.kt

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.xebia.functional.xef.io
22

3+
import kotlinx.cinterop.ExperimentalForeignApi
34
import kotlinx.cinterop.refTo
45
import kotlinx.cinterop.toKString
56
import kotlinx.coroutines.runBlocking
@@ -50,6 +51,7 @@ object WindowsCommandExecutor : CommandExecutor {
5051
/**
5152
* https://stackoverflow.com/questions/57123836/kotlin-native-execute-command-and-get-the-output
5253
*/
54+
@OptIn(ExperimentalForeignApi::class)
5355
override suspend fun executeCommandAndCaptureOutput(command: List<String>, options: ExecuteCommandOptions): String {
5456
chdir(options.directory)
5557
val commandToExecute = command.joinToString(separator = " ") { arg ->

gradle/libs.versions.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[versions]
22
arrow = "1.2.0"
33
arrowGradle = "0.12.0-rc.5"
4-
kotlin = "1.8.22"
4+
kotlin = "1.9.0"
55
kotlinx-json = "1.5.1"
66
ktor = "2.3.2"
77
spotless = "6.20.0"
@@ -40,6 +40,7 @@ jsonschema = "4.31.1"
4040
jakarta = "3.0.2"
4141
suspend-transform = "0.3.1"
4242
suspendApp = "0.4.0"
43+
resources-kmp = "0.4.0"
4344

4445
[libraries]
4546
arrow-core = { module = "io.arrow-kt:arrow-core", version.ref = "arrow" }
@@ -129,3 +130,4 @@ scala-multiversion = { id = "com.adtran.scala-multiversion-plugin", version.ref
129130
kotest-multiplatform = { id = "io.kotest.multiplatform", version.ref = "kotest" }
130131
semver-gradle = { id="com.javiersc.semver", version.ref="semverGradle" }
131132
suspend-transform-plugin = { id="love.forte.plugin.suspend-transform", version.ref="suspend-transform" }
133+
resources = { id="com.goncalossilva.resources", version.ref="resources-kmp" }

tokenizer/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
alias(libs.plugins.spotless)
55
alias(libs.plugins.arrow.gradle.publish)
66
alias(libs.plugins.semver.gradle)
7-
id("com.goncalossilva.resources") version "0.3.2"
7+
alias(libs.plugins.resources)
88
}
99

1010
repositories {

0 commit comments

Comments
 (0)