You can use kotlinx-io, with gradle.
Artifacts live in jcenter:
repositories {
jcenter()
}
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-io-common:$kotlinx_io_version") // Common
}
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-io-jvm:$kotlinx_io_version") // JVM
}
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-io-js:$kotlinx_io_version") // JS
}
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-io-native:$kotlinx_io_version") // Native
}