Hey guys, does anyone know if "org.jetbrains.kotlinx:kotlinx-coroutines-test" can be used to test the "commonMain" code? Couldn't find any official docs, when I added this library to the project (to "_commonTest_.dependencies{}"), it's dependencies (at least "runTest") appeared available in my "commonTest" classes, but the dependencies from "org.jetbrains.kotlinx:kotlinx-coroutines-core" seemed to be broken in "commonMain".
d
Daniel Ferenczi
02/07/2024, 7:37 AM
Hey! If you by "seemed to be broken" mean that the imports of the coroutines-core lib are stated as "unresolved" I ran into this the other day as well. What I noticed was that the app(s) were actually building and deploying to device successfully which gave me the clue to look at the library dependencies in gradle for coroutines-core and coroutines-test and it turned out to be a version mismatch between the two libraries in my case. I.e. my coroutines-test library dependency was of a higher (1.8.0-RC2) version than my coroutines-core library dependency (1.7.3). Could this be the case for you as well?
o
OlgaDery
02/07/2024, 10:07 PM
Hi Daniel, it was exactly it! Thanks very much for pointing it out🙂