Skip to content

Commit 768fdb8

Browse files
committedJun 24, 2025·
Merge branch 'develop'
2 parents 8950a88 + 15c33ae commit 768fdb8

File tree

30 files changed

+80
-109
lines changed

30 files changed

+80
-109
lines changed
 

‎CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# CHANGELOG
22

3+
## 0.8.0
4+
> Published 24 June 2025
5+
6+
### Features
7+
- Updated Kotlin version to 2.2, Dokka to 2.0.0 and also updated few other dependencies [#455](https://github.com/Kotlin/kotlinx-io/pull/455), [#432](https://github.com/Kotlin/kotlinx-io/pull/432), [#442](https://github.com/Kotlin/kotlinx-io/pull/442), [#456](https://github.com/Kotlin/kotlinx-io/pull/456)
8+
- Increased deprecation level for `kotlinx.io.files.Path.source` and `kotlinx.io.files.Path.sink` to `ERROR` [#457](https://github.com/Kotlin/kotlinx-io/pull/457)
9+
### Bugfixes
10+
- Fixed `ArrayIndexOutOfBoundsException` thrown from `okio.Sink.asKotlinxIoRawSink` [#453](https://github.com/Kotlin/kotlinx-io/pull/453)
11+
312
## 0.7.0
413
> Published 26 February 2025
514

‎README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ repositories {
4949
Add the library to dependencies:
5050
```kotlin
5151
dependencies {
52-
implementation("org.jetbrains.kotlinx:kotlinx-io-core:0.7.0")
52+
implementation("org.jetbrains.kotlinx:kotlinx-io-core:0.8.0")
5353
}
5454
```
5555

@@ -59,7 +59,7 @@ kotlin {
5959
sourceSets {
6060
commonMain {
6161
dependencies {
62-
implementation("org.jetbrains.kotlinx:kotlinx-io-core:0.7.0")
62+
implementation("org.jetbrains.kotlinx:kotlinx-io-core:0.8.0")
6363
}
6464
}
6565
}
@@ -73,7 +73,7 @@ Add the library to dependencies:
7373
<dependency>
7474
<groupId>org.jetbrains.kotlinx</groupId>
7575
<artifactId>kotlinx-io-core-jvm</artifactId>
76-
<version>0.7.0</version>
76+
<version>0.8.0</version>
7777
</dependency>
7878
```
7979

‎build-logic/src/main/kotlin/kotlinx/io/conventions/kotlinx-io-android-compat.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pluginManager.withPlugin("org.gradle.java-base") {
99
apply(plugin = "ru.vyarus.animalsniffer")
1010

1111
configure<AnimalSnifferExtension> {
12-
sourceSets = listOf((project.extensions.getByName("sourceSets") as SourceSetContainer).getByName("main"))
12+
defaultTargets = setOf("jvmMain")
1313
}
1414
val signature: Configuration by configurations
1515
dependencies {
Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,19 @@
11
/*
2-
* Copyright 2017-2024 JetBrains s.r.o. and respective authors and developers.
2+
* Copyright 2017-2025 JetBrains s.r.o. and respective authors and developers.
33
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENCE file.
44
*/
55

6-
import org.jetbrains.dokka.gradle.*
7-
import java.net.URL
8-
96
plugins {
107
id("org.jetbrains.dokka")
118
}
129

13-
// shared configuration for all dokka tasks (both partial and multi-module)
14-
tasks.withType<AbstractDokkaTask>().configureEach {
15-
pluginsMapConfiguration.set(
16-
mapOf(
17-
"org.jetbrains.dokka.base.DokkaBase" to """{ "templatesDir" : "${
18-
rootDir.resolve("dokka-templates")
19-
}" }"""
20-
)
21-
)
22-
}
23-
24-
tasks.withType<DokkaTaskPartial>().configureEach {
10+
dokka {
2511
dokkaSourceSets.configureEach {
2612
includes.from("Module.md")
2713

2814
sourceLink {
2915
localDirectory = rootDir
30-
remoteUrl = URL("https://github.com/kotlin/kotlinx-io/tree/master")
16+
remoteUrl("https://github.com/kotlin/kotlinx-io/tree/master")
3117
remoteLineSuffix = "#L"
3218
}
3319

@@ -40,5 +26,9 @@ tasks.withType<DokkaTaskPartial>().configureEach {
4026
// as in kotlinx-io-multiplatform.gradle.kts:configureSourceSet
4127
val platform = name.dropLast(4)
4228
samples.from("$platform/test/samples")
29+
30+
}
31+
pluginsConfiguration.html {
32+
templatesDir = rootDir.resolve("dokka-templates")
4333
}
4434
}

‎build-logic/src/main/kotlin/kotlinx/io/conventions/kotlinx-io-multiplatform.gradle.kts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import kotlinx.io.build.configureJava9ModuleInfoCompilation
77
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
88
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
9+
import org.jetbrains.kotlin.gradle.dsl.JvmDefaultMode
910
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
1011
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
1112
import kotlin.jvm.optionals.getOrNull
@@ -30,17 +31,11 @@ kotlin {
3031
}
3132

3233
jvm {
33-
withJava()
3434
testRuns["test"].executionTask.configure {
3535
useJUnitPlatform()
3636
}
37-
// can be replaced with just `compilerOptions { }` in Kotlin 2.0
38-
compilations.configureEach {
39-
compileTaskProvider.configure {
40-
compilerOptions {
41-
freeCompilerArgs.add("-Xjvm-default=all")
42-
}
43-
}
37+
compilerOptions {
38+
jvmDefault = JvmDefaultMode.NO_COMPATIBILITY
4439
}
4540

4641
val mrjToolchain = versionCatalog.findVersion("multi.release.toolchain").getOrNull()?.requiredVersion

‎build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ dependencies {
3434
kover(project(":kotlinx-io-core"))
3535
kover(project(":kotlinx-io-bytestring"))
3636
kover(project(":kotlinx-io-okio"))
37+
38+
dokka(project(":kotlinx-io-bytestring"))
39+
dokka(project(":kotlinx-io-core"))
40+
dokka(project(":kotlinx-io-okio"))
3741
}
3842

3943
kover {

‎bytestring/apple/test/ByteStringAppleTest.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import platform.Foundation.NSData
1212
import platform.Foundation.create
1313
import platform.posix.memset
1414
import kotlin.io.encoding.Base64
15-
import kotlin.io.encoding.ExperimentalEncodingApi
1615
import kotlin.test.*
1716

1817
@OptIn(UnsafeNumber::class)
@@ -27,12 +26,12 @@ class ByteStringAppleTest {
2726
assertContentEquals(byteArrayOf(0, 1, 2, 3, 4, 5), copy.bytes!!.readBytes(copy.length.convert()))
2827
}
2928

30-
@OptIn(BetaInteropApi::class, ExperimentalEncodingApi::class)
29+
@OptIn(BetaInteropApi::class)
3130
@Test
3231
fun fromNSData() {
3332
assertTrue(NSData().toByteString().isEmpty())
3433
val src = NSData.create(
35-
base64EncodedString = Base64.Default.encode(byteArrayOf(0, 1, 2, 3, 4, 5)),
34+
base64EncodedString = Base64.encode(byteArrayOf(0, 1, 2, 3, 4, 5)),
3635
options = 0u
3736
)!!
3837
val copy = src.toByteString()

‎bytestring/apple/test/samples/samplesApple.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import platform.Foundation.*
1212
import kotlin.test.*
1313

1414
class ByteStringSamplesApple {
15-
@OptIn(UnsafeNumber::class, ExperimentalForeignApi::class, ExperimentalStdlibApi::class)
15+
@OptIn(UnsafeNumber::class, ExperimentalForeignApi::class)
1616
@Test
1717
fun nsDataConversion() {
1818
val originalByteString: ByteString = "Compress me, please!".encodeToByteString()

‎bytestring/common/src/Base64.kt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
package kotlinx.io.bytestring
77

88
import kotlin.io.encoding.Base64
9-
import kotlin.io.encoding.Base64.Default.encode
10-
import kotlin.io.encoding.Base64.Default.encodeToByteArray
11-
import kotlin.io.encoding.ExperimentalEncodingApi
129

1310
/**
1411
* Encodes bytes from the specified [source] byte string or its subrange.
@@ -30,7 +27,6 @@ import kotlin.io.encoding.ExperimentalEncodingApi
3027
*
3128
* @return a [ByteArray] with the resulting symbols.
3229
*/
33-
@ExperimentalEncodingApi
3430
public fun Base64.encodeToByteArray(source: ByteString, startIndex: Int = 0, endIndex: Int = source.size): ByteArray {
3531
return encodeToByteArray(source.getBackingArrayReference(), startIndex, endIndex)
3632
}
@@ -55,7 +51,6 @@ public fun Base64.encodeToByteArray(source: ByteString, startIndex: Int = 0, end
5551
*
5652
* @return the number of symbols written into [destination] array.
5753
*/
58-
@ExperimentalEncodingApi
5954
public fun Base64.encodeIntoByteArray(
6055
source: ByteString,
6156
destination: ByteArray,
@@ -84,7 +79,6 @@ public fun Base64.encodeIntoByteArray(
8479
*
8580
* @return a string with the resulting symbols.
8681
*/
87-
@ExperimentalEncodingApi
8882
public fun Base64.encode(
8983
source: ByteString,
9084
startIndex: Int = 0,
@@ -110,7 +104,6 @@ public fun Base64.encode(
110104
*
111105
* @return the destination appendable.
112106
*/
113-
@ExperimentalEncodingApi
114107
public fun <A : Appendable> Base64.encodeToAppendable(
115108
source: ByteString,
116109
destination: A,
@@ -139,7 +132,6 @@ public fun <A : Appendable> Base64.encodeToAppendable(
139132
*
140133
* @return a [ByteArray] with the resulting bytes.
141134
*/
142-
@ExperimentalEncodingApi
143135
public fun Base64.decode(source: ByteString, startIndex: Int = 0, endIndex: Int = source.size): ByteArray {
144136
return decode(source.getBackingArrayReference(), startIndex, endIndex)
145137
}
@@ -162,7 +154,6 @@ public fun Base64.decode(source: ByteString, startIndex: Int = 0, endIndex: Int
162154
*
163155
* @return a [ByteArray] with the resulting bytes.
164156
*/
165-
@ExperimentalEncodingApi
166157
public fun Base64.decodeToByteString(source: CharSequence, startIndex: Int = 0, endIndex: Int = source.length): ByteString {
167158
return ByteString.wrap(decode(source, startIndex, endIndex))
168159
}
@@ -189,7 +180,6 @@ public fun Base64.decodeToByteString(source: CharSequence, startIndex: Int = 0,
189180
*
190181
* @return the number of bytes written into [destination] array.
191182
*/
192-
@ExperimentalEncodingApi
193183
public fun Base64.decodeIntoByteArray(
194184
source: ByteString,
195185
destination: ByteArray,
@@ -218,7 +208,6 @@ public fun Base64.decodeIntoByteArray(
218208
*
219209
* @return a [ByteString] with the resulting bytes.
220210
*/
221-
@ExperimentalEncodingApi
222211
public fun Base64.decodeToByteString(source: ByteArray, startIndex: Int = 0, endIndex: Int = source.size): ByteString {
223212
return ByteString.wrap(decode(source, startIndex, endIndex))
224213
}
@@ -241,7 +230,6 @@ public fun Base64.decodeToByteString(source: ByteArray, startIndex: Int = 0, end
241230
*
242231
* @return a [ByteString] with the resulting bytes.
243232
*/
244-
@ExperimentalEncodingApi
245233
public fun Base64.decodeToByteString(source: ByteString, startIndex: Int = 0, endIndex: Int = source.size): ByteString {
246234
return ByteString.wrap(decode(source.getBackingArrayReference(), startIndex, endIndex))
247235
}

‎bytestring/common/src/Hex.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ package kotlinx.io.bytestring
1414
*
1515
* @throws IllegalArgumentException if the result length is more than [String] maximum capacity.
1616
*/
17-
@ExperimentalStdlibApi
1817
public fun ByteString.toHexString(format: HexFormat = HexFormat.Default): String {
1918
return getBackingArrayReference().toHexString(0, getBackingArrayReference().size, format)
2019
}
@@ -32,7 +31,6 @@ public fun ByteString.toHexString(format: HexFormat = HexFormat.Default): String
3231
* @throws IllegalArgumentException when `startIndex > endIndex`.
3332
* @throws IllegalArgumentException if the result length is more than [String] maximum capacity.
3433
*/
35-
@ExperimentalStdlibApi
3634
public fun ByteString.toHexString(
3735
startIndex: Int = 0,
3836
endIndex: Int = size,
@@ -52,7 +50,6 @@ public fun ByteString.toHexString(
5250
*
5351
* @throws IllegalArgumentException if this string does not comply with the specified [format].
5452
*/
55-
@ExperimentalStdlibApi
5653
public fun String.hexToByteString(format: HexFormat = HexFormat.Default): ByteString {
5754
return ByteString.wrap(hexToByteArray(format))
5855
}

‎bytestring/common/test/ByteStringBase64Test.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@
33
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE.txt file.
44
*/
55

6-
@file:OptIn(ExperimentalEncodingApi::class)
7-
86
package kotlinx.io.bytestring
97

108
import kotlin.io.encoding.Base64
11-
import kotlin.io.encoding.ExperimentalEncodingApi
129
import kotlin.test.*
1310

1411
class ByteStringBase64Test {

‎bytestring/common/test/ByteStringHexTest.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE.txt file.
44
*/
55

6-
@file:OptIn(ExperimentalStdlibApi::class)
7-
86
package kotlinx.io.bytestring
97

108
import kotlin.test.Test

‎core/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ tasks.named("wasmWasiNodeTest") {
6161
val templateFile = layout.projectDirectory.file("wasmWasi/test/test-driver.mjs.template").asFile
6262

6363
val driverFile = layout.buildDirectory.file(
64-
"compileSync/wasmWasi/test/testDevelopmentExecutable/kotlin/kotlinx-io-kotlinx-io-core-wasm-wasi-test.mjs"
64+
"compileSync/wasmWasi/test/testDevelopmentExecutable/kotlin/kotlinx-io-kotlinx-io-core-test.mjs"
6565
)
6666

6767
fun File.mkdirsAndEscape(): String {

‎core/common/src/files/Paths.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,16 @@ public fun Path(base: Path, vararg parts: String): Path {
100100
/**
101101
* Returns [RawSource] for the given file or throws if path is not a file or does not exist
102102
*
103-
* Use of this method is deprecated with warning since kotlinx-io 0.3.0. The method will be removed in 0.7.0.
103+
* Use of this method is deprecated with warning since kotlinx-io 0.3.0, with error since 0.8.0,
104+
* and it will be removed in the future.
104105
*/
105106
@Deprecated(
106107
message = "Use FileSystem.source instead",
107108
replaceWith = ReplaceWith(
108109
expression = "SystemFileSystem.source(this).buffered()",
109110
imports = arrayOf("kotlinx.io.files.FileSystem")
110111
),
111-
level = DeprecationLevel.WARNING
112+
level = DeprecationLevel.ERROR
112113
)
113114
@JvmName("sourceDeprecated")
114115
public fun Path.source(): Source = SystemFileSystem.source(this).buffered()
@@ -117,15 +118,16 @@ public fun Path.source(): Source = SystemFileSystem.source(this).buffered()
117118
* Returns [RawSink] for the given path, creates file if it doesn't exist, throws if it's a directory,
118119
* overwrites contents.
119120
*
120-
* Use of this method is deprecated with warning since kotlinx-io 0.3.0. The method will be removed in 0.7.0.
121+
* Use of this method is deprecated with warning since kotlinx-io 0.3.0, with error since 0.8.0,
122+
* and it will be removed in the future.
121123
*/
122124
@Deprecated(
123125
message = "Use FileSystem.sink instead",
124126
replaceWith = ReplaceWith(
125127
expression = "SystemFileSystem.sink(this).buffered()",
126128
imports = arrayOf("kotlinx.io.files.FileSystem")
127129
),
128-
level = DeprecationLevel.WARNING
130+
level = DeprecationLevel.ERROR
129131
)
130132
@JvmName("sinkDeprecated")
131133
public fun Path.sink(): Sink = SystemFileSystem.sink(this).buffered()

‎core/common/test/Utf8Test.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,6 @@ class Utf8Test {
432432
buffer.assertUtf8StringDecoded("${REPLACEMENT_CHARACTER}aaa", "f0616161")
433433
}
434434

435-
@OptIn(ExperimentalStdlibApi::class)
436435
@Test
437436
fun encodeUtf16SurrogatePair() {
438437
val buffer = Buffer()

‎core/common/test/files/SmokeFileTest.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,6 @@ class SmokeFileTest {
331331
assertFailsWith<IOException> { SystemFileSystem.source(dir).buffered().readByte() }
332332
}
333333

334-
@OptIn(ExperimentalStdlibApi::class)
335334
@Test
336335
fun writeDirectory() {
337336
val dir = createTempPath()

‎core/common/test/samples/unsafe/unsafeSamples.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import kotlinx.io.bytestring.ByteString
1010
import kotlinx.io.unsafe.UnsafeBufferOperations
1111
import kotlinx.io.unsafe.withData
1212
import kotlin.io.encoding.Base64
13-
import kotlin.io.encoding.ExperimentalEncodingApi
1413
import kotlin.math.min
1514
import kotlin.random.Random
1615
import kotlin.test.*
@@ -47,7 +46,7 @@ class UnsafeBufferOperationsSamples {
4746
assertEquals(10042L, buffer.size)
4847
}
4948

50-
@OptIn(ExperimentalEncodingApi::class, UnsafeIoApi::class)
49+
@OptIn(UnsafeIoApi::class)
5150
@Test
5251
fun moveToTail() {
5352
fun Buffer.writeBase64(data: ByteArray, encoder: Base64 = Base64.Default) {

‎core/jvm/test/samples/unsafeAccessSamplesJvm.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class UnsafeReadWriteSamplesJvm {
101101
}
102102
}
103103

104-
@OptIn(UnsafeByteStringApi::class, ExperimentalStdlibApi::class)
104+
@OptIn(UnsafeByteStringApi::class)
105105
@Test
106106
fun messageDigest() {
107107
fun Buffer.digest(algorithm: String): ByteString {

‎core/jvm/test/utilJVM.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import java.io.File
99
import kotlin.random.Random
1010
import kotlin.test.assertEquals
1111

12-
@OptIn(ExperimentalStdlibApi::class)
1312
actual fun tempFileName(): String {
1413
val tmpDir = SystemTemporaryDirectory.file
1514
while (true) {

‎core/native/test/util.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import platform.posix.F_OK
1212
import platform.posix.access
1313
import kotlin.random.Random
1414

15-
@OptIn(ExperimentalStdlibApi::class)
1615
actual fun tempFileName(): String {
1716
val tmpDir = SystemTemporaryDirectory.path
1817
for (i in 0 until 10) {

‎core/nodeFilesystemShared/test/files/utils.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import kotlinx.io.node.os
1010
import kotlinx.io.node.path
1111
import kotlin.random.Random
1212

13-
@OptIn(ExperimentalStdlibApi::class)
1413
actual fun tempFileName(): String {
1514
while (true) {
1615
val tmpdir = os.tmpdir()

‎core/wasmWasi/test/test-driver.mjs.template

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,20 @@ const wasi = new WASI({ version: 'preview1', args: argv, env: env, preopens: {
77
'/var/log': '<SYSTEM_TEMP_DIR2>'
88
}});
99

10-
const module = await import(/* webpackIgnore: true */'node:module');
11-
const require = module.default.createRequire(import.meta.url);
12-
const fs = require('fs');
13-
const path = require('path');
14-
const url = require('url');
15-
const filepath = url.fileURLToPath(import.meta.url);
16-
const dirpath = path.dirname(filepath);
17-
const wasmBuffer = fs.readFileSync(path.resolve(dirpath, './kotlinx-io-kotlinx-io-core-wasm-wasi-test.wasm'));
10+
const fs = await import('node:fs');
11+
const url = await import('node:url');
12+
const wasmBuffer = fs.readFileSync(url.fileURLToPath(import.meta.resolve('./kotlinx-io-kotlinx-io-core-test.wasm')));
1813
const wasmModule = new WebAssembly.Module(wasmBuffer);
1914
const wasmInstance = new WebAssembly.Instance(wasmModule, wasi.getImportObject());
2015

2116
wasi.initialize(wasmInstance);
2217

2318
const exports = wasmInstance.exports
2419

25-
export default new Proxy(exports, {
26-
_shownError: false,
27-
get(target, prop) {
28-
if (!this._shownError) {
29-
this._shownError = true;
30-
if (typeof console !== "undefined") {
31-
console.error("Do not use default import. Use corresponding named import instead.")
32-
}
33-
}
34-
return target[prop];
35-
}
36-
});
3720
export const {
38-
startUnitTests,
39-
_initialize,
40-
memory
41-
} = exports;
21+
memory,
22+
_initialize,
23+
startUnitTests
24+
} = exports
25+
26+

‎core/wasmWasi/test/utils.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ import kotlinx.io.files.Path
99
import kotlinx.io.files.SystemTemporaryDirectory
1010
import kotlin.random.Random
1111

12-
@OptIn(ExperimentalStdlibApi::class)
1312
actual fun tempFileName(): String =
1413
Path(SystemTemporaryDirectory, Random.nextBytes(32).toHexString()).toString()

‎gradle.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
#
55

66
group=org.jetbrains.kotlinx
7-
version=0.8.0-SNAPSHOT
7+
version=0.9.0-SNAPSHOT
88
kotlin.code.style=official
99
org.gradle.jvmargs=-Xmx4G
1010
nativeBenchmarksEnabled=true
1111
kotlin.mpp.applyDefaultHierarchyTemplate=false
12+
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
13+
org.jetbrains.dokka.experimental.gradle.pluginMode.nowarn=true

‎gradle/libs.versions.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[versions]
2-
kotlin = "2.1.0"
2+
kotlin = "2.2.0"
33
java = "8"
44
multi-release-toolchain = "17"
55
dokka = "2.0.0"
6-
kover = "0.8.3"
7-
bcv = "0.16.3"
8-
benchmark = "0.4.13"
6+
kover = "0.9.1"
7+
bcv = "0.17.0"
8+
benchmark = "0.4.14"
99
jmh = "1.37"
10-
coroutines = "1.9.0"
11-
animalsniffer = "1.7.1"
12-
okio = "3.9.1"
10+
coroutines = "1.10.2"
11+
animalsniffer = "2.0.0"
12+
okio = "3.10.2"
1313

1414
[libraries]
1515

‎integration/kotlinx-io-okio/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ kotlin {
4141
}
4242
}
4343

44-
tasks.withType(DokkaTaskPartial::class) {
44+
dokka {
4545
dokkaSourceSets.configureEach {
46-
externalDocumentationLink {
47-
url = URL("https://square.github.io/okio/3.x/okio/")
48-
packageListUrl = URL("https://square.github.io/okio/3.x/okio/okio/package-list")
46+
externalDocumentationLinks.register("okio") {
47+
url("https://square.github.io/okio/3.x/okio/")
48+
packageListUrl("https://square.github.io/okio/3.x/okio/okio/package-list")
4949
}
5050
}
5151
}

‎integration/kotlinx-io-okio/common/src/OkioAdapters.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ public fun okio.Sink.asKotlinxIoRawSink(): RawSink = object : RawSink {
109109
buffer.write(data, from, toRead)
110110
toRead
111111
}
112-
this@asKotlinxIoRawSink.write(buffer, byteCount)
113112
}
113+
this@asKotlinxIoRawSink.write(buffer, byteCount)
114114
}
115115

116116
override fun flush() = withOkio2KxIOExceptionMapping {

‎integration/kotlinx-io-okio/common/test/OkioAdaptersTest.kt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,19 @@ class OkioAdaptersTest {
5252
}
5353
}
5454

55+
@Test
56+
fun okioSinkLargeWrite() {
57+
val arrayLength = 8193
58+
val data = ByteArray(arrayLength) { it.toByte() }
59+
val kxBuffer = kotlinx.io.Buffer().also { it.write(data) }
60+
val okioBuffer = okio.Buffer()
61+
val okioSink = okioBuffer as okio.Sink
62+
val wrapper = okioSink.asKotlinxIoRawSink()
63+
wrapper.write(kxBuffer, arrayLength.toLong())
64+
assertContentEquals(data, okioBuffer.readByteArray())
65+
assertTrue(kxBuffer.exhausted())
66+
}
67+
5568
@Test
5669
fun okioSinkViewDelegation() {
5770
var closed = false

‎kotlin-js-store/wasm/yarn.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+

‎kotlin-js-store/yarn.lock

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -456,11 +456,6 @@ to-regex-range@^5.0.1:
456456
dependencies:
457457
is-number "^7.0.0"
458458

459-
typescript@5.5.4:
460-
version "5.5.4"
461-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba"
462-
integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==
463-
464459
workerpool@^6.5.1:
465460
version "6.5.1"
466461
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544"

0 commit comments

Comments
 (0)
Please sign in to comment.