I’m trying to enable wasm on a multiplatform proje...
# multiplatform
c
I’m trying to enable wasm on a multiplatform project that uses coroutines, but i get this error message from gradle:
Copy code
> No matching variant of org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.2-wasm3 was found. The consumer was configured to find a library for use during 'kotlin-runtime', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm', attribute 'org.jetbrains.kotlin.wasm.target' with value 'wasi', attribute 'org.jetbrains.kotlin.js.public.package.json' with value 'public-package-json' but:
          - Variant 'androidNativeArm32ApiElements-published' capability org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.2-wasm3 declares a library:
              - Incompatible because this component declares a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
(I got the dependency info from https://kotlinlang.org/docs/wasm-libraries.html)
z
Which source set's dependencies are you adding that wasm coroutine library to?
p
You can ask in #compose-web and #webassembly
c
adding it to the common source set. but will ask in webassembly, did not know that there is a channel for that, thanks!
z
I believe you can only add the wasm artifact to the wasm source set specifically
But you'll get a proper answer over there for sure 😃
288 Views