Skip to content

Commit bddb297

Browse files
committed
Introduce kotlinx-io-coroutines module
1 parent 246f77b commit bddb297

File tree

10 files changed

+73
-3
lines changed

10 files changed

+73
-3
lines changed

core/build.gradle.kts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,9 @@ kotlin {
4848
sourceSets {
4949
commonMain.dependencies {
5050
api(project(":kotlinx-io-bytestring"))
51-
api(libs.kotlinx.coroutines.core)
5251
}
53-
commonTest.dependencies {
54-
implementation(libs.kotlinx.coroutines.test)
52+
appleTest.dependencies {
53+
implementation(libs.kotlinx.coroutines.core)
5554
}
5655
}
5756
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
public final class kotlinx/io/coroutines/DelimitingByteStreamDecoder : kotlinx/io/coroutines/StreamingDecoder {
2+
public fun <init> ()V
3+
public fun <init> (B)V
4+
public synthetic fun <init> (BILkotlin/jvm/internal/DefaultConstructorMarker;)V
5+
public fun decode ([BLkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
6+
public final fun getDelimiter ()B
7+
public fun onClose (Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
8+
}
9+
10+
public final class kotlinx/io/coroutines/SourceFlowKt {
11+
public static final field READ_BUFFER_SIZE J
12+
public static final fun asFlow (Lkotlinx/io/RawSource;Lkotlinx/io/coroutines/StreamingDecoder;J)Lkotlinx/coroutines/flow/Flow;
13+
public static synthetic fun asFlow$default (Lkotlinx/io/RawSource;Lkotlinx/io/coroutines/StreamingDecoder;JILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
14+
}
15+
16+
public abstract interface class kotlinx/io/coroutines/StreamingDecoder {
17+
public abstract fun decode ([BLkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
18+
public abstract fun onClose (Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
19+
}
20+

coroutines/build.gradle.kts

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* Copyright 2010-2024 JetBrains s.r.o. and respective authors and developers.
3+
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENCE file.
4+
*/
5+
6+
plugins {
7+
kotlin("multiplatform")
8+
// id("kotlinx-io-multiplatform")
9+
id("kotlinx-io-publish")
10+
id("kotlinx-io-dokka")
11+
id("kotlinx-io-compatibility")
12+
alias(libs.plugins.kover)
13+
}
14+
15+
kotlin {
16+
sourceSets {
17+
commonMain.dependencies {
18+
api(project(":kotlinx-io-core"))
19+
api(libs.kotlinx.coroutines.core)
20+
}
21+
commonTest.dependencies {
22+
implementation(kotlin("test"))
23+
implementation(libs.kotlinx.coroutines.test)
24+
}
25+
}
26+
27+
jvm()
28+
29+
explicitApi()
30+
31+
withSourcesJar()
32+
33+
// js {
34+
// nodejs {
35+
// testTask {
36+
// useMocha {
37+
// timeout = "300s"
38+
// }
39+
// }
40+
// }
41+
// browser {
42+
// testTask {
43+
// useMocha {
44+
// timeout = "300s"
45+
// }
46+
// }
47+
// }
48+
// }
49+
}

core/common/src/coroutines/DelimitingByteStreamDecoder.kt renamed to coroutines/src/commonMain/kotlin/coroutines/DelimitingByteStreamDecoder.kt

File renamed without changes.
File renamed without changes.

core/common/src/coroutines/StreamingDecoder.kt renamed to coroutines/src/commonMain/kotlin/coroutines/StreamingDecoder.kt

File renamed without changes.

core/common/test/coroutines/DelimitingByteStreamDecoderTest.kt renamed to coroutines/src/commonTest/kotlin/coroutines/DelimitingByteStreamDecoderTest.kt

File renamed without changes.

core/common/test/coroutines/KeyValueStreamIntegrationTest.kt renamed to coroutines/src/commonTest/kotlin/coroutines/KeyValueStreamIntegrationTest.kt

File renamed without changes.

core/common/test/coroutines/RawSourceAsFlowTest.kt renamed to coroutines/src/commonTest/kotlin/coroutines/RawSourceAsFlowTest.kt

File renamed without changes.

settings.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ plugins {
2020
rootProject.name = "kotlinx-io"
2121

2222
include(":kotlinx-io-core")
23+
include(":kotlinx-io-coroutines")
2324
include(":kotlinx-io-benchmarks")
2425
include(":kotlinx-io-bytestring")
2526
include(":kotlinx-io-smoke-tests")
2627
include(":kotlinx-io-okio")
2728

2829
project(":kotlinx-io-core").projectDir = file("./core")
30+
project(":kotlinx-io-coroutines").projectDir = file("./coroutines")
2931
project(":kotlinx-io-benchmarks").projectDir = file("./benchmarks")
3032
project(":kotlinx-io-bytestring").projectDir = file("./bytestring")
3133
project(":kotlinx-io-smoke-tests").projectDir = file("./smoke-tests")

0 commit comments

Comments
 (0)