From a91c73c8316df1df310934ed28aa03f3bdfc66b0 Mon Sep 17 00:00:00 2001 From: michalharakal Date: Mon, 21 Sep 2026 10:46:45 +0200 Subject: [PATCH] fix(data-source): export kotlinx-io as api -- Source/Sink are in the public API DataSourceArtifact.openSource()/copyTo(), DataSourceRemoteContent and DataSourceArtifactStore expose kotlinx.io.Source and Sink, but kotlinx-io was an implementation dependency (runtime scope in the published POM). A consumer could not call those functions without declaring kotlinx-io itself: "Cannot access class kotlinx.io.Source". Found by the first external JVM consumer, the cartridge blueprint materializer plugin. --- skainet-data/skainet-data-source/build.gradle.kts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skainet-data/skainet-data-source/build.gradle.kts b/skainet-data/skainet-data-source/build.gradle.kts index 240ca1ec1..1c8827e0a 100644 --- a/skainet-data/skainet-data-source/build.gradle.kts +++ b/skainet-data/skainet-data-source/build.gradle.kts @@ -10,7 +10,10 @@ kotlin { sourceSets { commonMain.dependencies { implementation(libs.kotlinx.coroutines) - implementation(libs.kotlinx.io.core) + // `api`: kotlinx.io.Source / Sink are part of this module's public API (DataSourceArtifact.openSource(), + // copyTo(), DataSourceRemoteContent, DataSourceArtifactStore), so consumers need them on their compile + // classpath. As `implementation` a consumer could not call those functions without adding kotlinx-io itself. + api(libs.kotlinx.io.core) implementation(libs.kotlinx.serialization.json) }