Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
5 changes: 5 additions & 0 deletions api/yoki.api
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down
5 changes: 3 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import io.gitlab.arturbosch.detekt.Detekt
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
alias(libs.plugins.kotlin.multiplatform)
Expand Down Expand Up @@ -33,9 +34,9 @@ kotlin {
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
}
}
compilations.all {
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
freeCompilerArgs = listOf("-Xjvm-default=all")
freeCompilerArgs += listOf("-Xjvm-default=all")
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
8 changes: 1 addition & 7 deletions src/jvmMain/kotlin/me/devnatan/yoki/io/Flow.jvm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,8 @@ import me.devnatan.yoki.Closeable

public fun interface YokiFlow<T> {
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
}

Expand All @@ -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)
}
}
2 changes: 2 additions & 0 deletions src/nativeMain/kotlin/me/devnatan/yoki/Platform.native.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package me.devnatan.yoki

import kotlinx.cinterop.ExperimentalForeignApi
import kotlinx.cinterop.toKString
import platform.posix.getenv

Expand All @@ -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()
}
Expand Down