Skip to content

Commit 4f67d20

Browse files
committed
Merge branch 'master' into develop
2 parents 080b027 + 2f4196f commit 4f67d20

File tree

6 files changed

+45
-17
lines changed

6 files changed

+45
-17
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@
1111
A multiplatform Kotlin library providing basic IO primitives. `kotlinx-io` is based on [Okio](https://github.com/square/okio) but does not preserve backward compatibility with it.
1212

1313
## Overview
14-
The library is built around `Buffer` - a mutable sequence of bytes. `Buffer` works like a queue allowing one to read data from its head or write data to its tail.
14+
**kotlinx-io** is built around `Buffer` - a mutable sequence of bytes.
1515

16-
`Buffer` provides functions to read and write data of different built-in types and copy data to or from other buffers. Depending on a target platform, extension functions allowing data exchange with platform-specific types are also provided.
16+
`Buffer` works like a queue, allowing to read data from its head or to write data to its tail.
17+
`Buffer` provides functions to read and write data of different built-in types, and to copy data to or from other `Buffer`s.
18+
Depending on the target platform, extension functions allowing data exchange with platform-specific types are also available.
1719

18-
`Buffer` consists of segments organized as a linked list. Segments allow reducing memory allocations during the buffer's expansion and copying. The latter is achieved by delegating or sharing the ownership over the underlying buffer's segments with other buffers.
20+
A `Buffer` consists of segments organized as a linked list: segments allow reducing memory allocations during the buffer's expansion and copy,
21+
with the latter achieved by delegating or sharing the ownership over the underlying buffer's segments with other buffers.
1922

20-
The library also provides interfaces representing data sources and destinations - `Source` and `Sink`.
23+
**kotlinx-io** provides interfaces representing data sources and destinations - `Source` and `Sink`,
24+
and in addition to the *mutable* `Buffer` the library also provides an *immutable* sequence of bytes - `ByteString`.
2125

22-
In addition to `Buffer`, the library provides an immutable sequence of bytes - `ByteString`.
26+
An experimental filesystem support is shipped under the `kotlinx.io.files` package,
27+
which includes the `FileSystem` interface and its default implementation - `SystemFileSystem`.
2328

24-
Also, there's an experimental filesystem support provided by `kotlinx.io.files` package.
25-
The package includes `FileSystem` interface and its implementation - `SystemFileSystem`.
26-
27-
`FileSystem` provides basic operations for working with files and directories.
28-
29-
File and directory paths are represented by yet another class provided by the package - `Path`.
29+
`FileSystem` provides basic operations for working with files and directories, which are represented by yet another class under the same package - `Path`.
3030

3131
There are two `kotlinx-io` modules:
3232
- [kotlinx-io-bytestring](./bytestring) - provides `ByteString`.

build-logic/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ repositories {
1313

1414
dependencies {
1515
implementation(libs.kotlin.gradle.plugin)
16+
implementation(libs.dokka.gradle.plugin)
1617
implementation(libs.animalsniffer.gradle.plugin)
1718
}
1819

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* Copyright 2017-2023 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+
import org.jetbrains.dokka.gradle.*
7+
import java.net.*
8+
9+
plugins {
10+
id("org.jetbrains.dokka")
11+
}
12+
13+
tasks.withType<DokkaTaskPartial>().configureEach {
14+
dokkaSourceSets.configureEach {
15+
includes.from("Module.md")
16+
17+
if (name.endsWith("Main")) {
18+
sourceLink {
19+
// sources are located in projectDir/PLATFORM/src
20+
// where the PLATFORM could be jvm, js, darwin, etc.
21+
// configuration happens in kotlinx-io-multiplatform.gradle.kts:KotlinSourceSet.configureSourceSet
22+
val platform = name.dropLast(4)
23+
val relPath = rootProject.projectDir.toPath().relativize(projectDir.toPath())
24+
localDirectory.set(projectDir.resolve("$platform/src"))
25+
remoteUrl.set(URL("https://github.com/kotlin/kotlinx-io/tree/master/$relPath/$platform/src"))
26+
remoteLineSuffix.set("#L")
27+
}
28+
}
29+
}
30+
}

bytestring/build.gradle.kts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import org.jetbrains.dokka.gradle.DokkaTaskPartial
33
plugins {
44
id("kotlinx-io-multiplatform")
55
id("kotlinx-io-publish")
6+
id("kotlinx-io-dokka")
67
id("kotlinx-io-android-compat")
78
alias(libs.plugins.kover)
8-
alias(libs.plugins.dokka)
99
}
1010

1111
kotlin {
@@ -30,8 +30,6 @@ kotlin {
3030

3131
tasks.withType<DokkaTaskPartial>().configureEach {
3232
dokkaSourceSets.configureEach {
33-
includes.from("Module.md")
34-
3533
perPackageOption {
3634
suppress.set(true)
3735
matchingRegex.set(".*unsafe.*")

core/build.gradle.kts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import org.jetbrains.kotlin.gradle.targets.js.dsl.KotlinTargetWithNodeJsDsl
99
plugins {
1010
id("kotlinx-io-multiplatform")
1111
id("kotlinx-io-publish")
12+
id("kotlinx-io-dokka")
1213
id("kotlinx-io-android-compat")
1314
alias(libs.plugins.kover)
14-
alias(libs.plugins.dokka)
1515
}
1616

1717
kotlin {
@@ -69,8 +69,6 @@ kotlin {
6969

7070
tasks.withType<DokkaTaskPartial>().configureEach {
7171
dokkaSourceSets.configureEach {
72-
includes.from("Module.md")
73-
7472
samples.from(
7573
"common/test/samples/rawSinkSample.kt",
7674
"common/test/samples/rawSourceSample.kt",

gradle/libs.versions.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ animalsniffer = "1.7.1"
1313

1414
kotlinx-benchmark-runtime = { group = "org.jetbrains.kotlinx", name = "kotlinx-benchmark-runtime", version.ref = "benchmark" }
1515
kotlin-gradle-plugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
16+
dokka-gradle-plugin = { group = "org.jetbrains.dokka", name = "dokka-gradle-plugin", version.ref = "dokka" }
1617
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "coroutines" }
1718
animalsniffer-gradle-plugin = { group = "ru.vyarus", name = "gradle-animalsniffer-plugin", version.ref = "animalsniffer" }
1819

0 commit comments

Comments
 (0)