diff --git a/CHANGELOG.md b/CHANGELOG.md index e0bbad1..59760cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ * Enhanced Java interoperability (#97) * Implementation of /events to monitor system events in real time (#101) +* Bump kotlin from 1.8.22 to 1.9.0 and okio from 3.4.0 to 3.5.0 (#102) # 0.1.1 (08-05-2023) diff --git a/api/yoki.api b/api/yoki.api index 3afceec..f3c4d04 100644 --- a/api/yoki.api +++ b/api/yoki.api @@ -798,6 +798,7 @@ public final class me/devnatan/yoki/models/Mount$Type : java/lang/Enum { public static final field NamedPipe Lme/devnatan/yoki/models/Mount$Type; public static final field Tmpfs Lme/devnatan/yoki/models/Mount$Type; public static final field Volume Lme/devnatan/yoki/models/Mount$Type; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Lme/devnatan/yoki/models/Mount$Type; public static fun values ()[Lme/devnatan/yoki/models/Mount$Type; } @@ -847,6 +848,7 @@ public final class me/devnatan/yoki/models/MountBindOptions$Propagation : java/l public static final field RSlave Lme/devnatan/yoki/models/MountBindOptions$Propagation; public static final field Shared Lme/devnatan/yoki/models/MountBindOptions$Propagation; public static final field Slave Lme/devnatan/yoki/models/MountBindOptions$Propagation; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Lme/devnatan/yoki/models/MountBindOptions$Propagation; public static fun values ()[Lme/devnatan/yoki/models/MountBindOptions$Propagation; } @@ -3112,6 +3114,7 @@ public final class me/devnatan/yoki/models/system/EventAction : java/lang/Enum { public static final field UNKNOWN Lme/devnatan/yoki/models/system/EventAction; public static final field UNPAUSE Lme/devnatan/yoki/models/system/EventAction; public static final field UPDATE Lme/devnatan/yoki/models/system/EventAction; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Lme/devnatan/yoki/models/system/EventAction; public static fun values ()[Lme/devnatan/yoki/models/system/EventAction; } @@ -3159,6 +3162,7 @@ public final class me/devnatan/yoki/models/system/EventScope : java/lang/Enum { public static final field LOCAL Lme/devnatan/yoki/models/system/EventScope; public static final field SWARM Lme/devnatan/yoki/models/system/EventScope; public static final field UNKNOWN Lme/devnatan/yoki/models/system/EventScope; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Lme/devnatan/yoki/models/system/EventScope; public static fun values ()[Lme/devnatan/yoki/models/system/EventScope; } @@ -3181,6 +3185,7 @@ public final class me/devnatan/yoki/models/system/EventType : java/lang/Enum { public static final field SERVICE Lme/devnatan/yoki/models/system/EventType; public static final field UNKNOWN Lme/devnatan/yoki/models/system/EventType; public static final field VOLUME Lme/devnatan/yoki/models/system/EventType; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Lme/devnatan/yoki/models/system/EventType; public static fun values ()[Lme/devnatan/yoki/models/system/EventType; } diff --git a/build.gradle.kts b/build.gradle.kts index 2ae8284..45c7712 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,5 @@ import io.gitlab.arturbosch.detekt.Detekt +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { alias(libs.plugins.kotlin.multiplatform) @@ -33,9 +34,9 @@ kotlin { exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL } } - compilations.all { + tasks.withType().configureEach { kotlinOptions { - freeCompilerArgs = listOf("-Xjvm-default=all") + freeCompilerArgs += listOf("-Xjvm-default=all") } } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e5e169c..125ed81 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,12 +1,12 @@ [versions] -kotlin = "1.8.22" +kotlin = "1.9.0" ktx-coroutines = "1.7.3" ktx-serialization = "1.5.1" ktor = "2.3.3" junixsocket = "2.6.1" ktx-datetime = "0.4.0" junit = "5.10.0" -okio = "3.4.0" +okio = "3.5.0" slf4j = "2.0.7" plugin-kotlinter = "3.15.0" plugin-publishOnCentral = "5.0.10" diff --git a/src/jvmMain/kotlin/me/devnatan/yoki/io/Flow.jvm.kt b/src/jvmMain/kotlin/me/devnatan/yoki/io/Flow.jvm.kt index 8f41c47..0a2217d 100644 --- a/src/jvmMain/kotlin/me/devnatan/yoki/io/Flow.jvm.kt +++ b/src/jvmMain/kotlin/me/devnatan/yoki/io/Flow.jvm.kt @@ -14,14 +14,8 @@ import me.devnatan.yoki.Closeable public fun interface YokiFlow { public fun onEach(value: T) - - @JvmDefault public fun onStart(): Unit = Unit - - @JvmDefault public fun onError(cause: Throwable): Unit = Unit - - @JvmDefault public fun onComplete(error: Throwable?): Unit = Unit } @@ -39,7 +33,7 @@ internal class InternalYokiFlow internal constructor() : Closeable { } override fun close() { - val exception = error?.let { cause -> CancellationException("An error ocurred while consuming flow.", cause) } + val exception = error?.let { cause -> CancellationException("An error occurred while consuming flow.", cause) } coroutineScope.cancel(exception) } } diff --git a/src/nativeMain/kotlin/me/devnatan/yoki/Platform.native.kt b/src/nativeMain/kotlin/me/devnatan/yoki/Platform.native.kt index 9d9799b..18ef967 100644 --- a/src/nativeMain/kotlin/me/devnatan/yoki/Platform.native.kt +++ b/src/nativeMain/kotlin/me/devnatan/yoki/Platform.native.kt @@ -1,5 +1,6 @@ package me.devnatan.yoki +import kotlinx.cinterop.ExperimentalForeignApi import kotlinx.cinterop.toKString import platform.posix.getenv @@ -14,6 +15,7 @@ internal actual fun isUnixPlatform(): Boolean { * Gets the value of the specified environment variable. * An environment variable is a system-dependent external named value */ +@OptIn(ExperimentalForeignApi::class) internal actual fun env(key: String): String? { return getenv(key)?.toKString() }