Installation
Add the common API to your shared source set:
repositories { mavenCentral()}
kotlin { sourceSets { commonMain.dependencies { implementation("top.kagg886.wvbridge:core:<version>") } }}JVM runtime
Section titled “JVM runtime”JVM targets also need the native runtime for the current platform. Use Google’s os-detector Gradle plugin to select it from osdetector.classifier:
plugins { id("com.google.osdetector") version "1.7.3"}
kotlin { jvm()
sourceSets { jvmMain.dependencies { val platform = when (osdetector.classifier) { "windows-x86_64" -> "platform-windows" "linux-x86_64" -> "platform-linux" "osx-aarch_64" -> "platform-macos" else -> error("Unsupported JVM runtime: ${osdetector.classifier}") }
runtimeOnly("top.kagg886.wvbridge:$platform:<version>") } }}The JVM native runtime currently supports Windows x64, Linux x64, and macOS arm64.