docs/multiplatform.md
Okio is a Kotlin Multiplatform project. We're still completing our feature coverage.
JVM and native platforms.
JVM-only.
Timeout is on all platforms, but only the JVM has a useful implementation.
Available on all platforms.
Available on all platforms. For JavaScript this requires Node.js.
Okio includes Kotlin implementations of MD5, SHA-1, SHA-256, and SHA-512. This includes both hash functions and HMAC functions.
Okio uses the built-in implementations of these functions on the JVM.
// build.gradle.kts
kotlin {
sourceSets {
val okioVersion = "3.XXX"
val commonMain by getting {
dependencies {
implementation("com.squareup.okio:okio:$okioVersion")
}
}
val jsMain by getting {
dependencies {
implementation("com.squareup.okio:okio-nodefilesystem:$okioVersion")
}
}
val commonTest by getting {
dependencies {
implementation("com.squareup.okio:okio-fakefilesystem:$okioVersion")
}
}
}
}