https://kotlinlang.org logo
#mockk
Title
# mockk
a

Anton Afanasev

05/19/2021, 2:06 PM
Hi. I am working on mobile kmm project. (ios + android) As per my understanding there is no way right now to import mockk into commonTest module, as it targets kotlin native as well. I am wondering: 1. Am I wrong? 2. What is the idea of io.mockk:mockk-common then? The documentation reference this dependency for Common Multiplatform.
b

Big Chungus

05/19/2021, 2:09 PM
mockk supports JVM & JS, so you CAN use it in common sourceSet if your module only targets those platforms
a

Anton Afanasev

05/19/2021, 2:10 PM
Gotcha. I guess it should be common-jvm then 🙂
b

Big Chungus

05/19/2021, 2:10 PM
it's not jvm-specific. As I said, it targets JS too
a

Anton Afanasev

05/19/2021, 2:11 PM
Sorry, my bad.
Do you have any idea if there any plans to support native?
b

Big Chungus

05/19/2021, 2:12 PM
No idea. Haven't used it in ages
🙏 1
c

christophsturm

05/19/2021, 2:12 PM
I think its not going to happen anytime soon, its not really clear how it should work
a

Anton Afanasev

05/19/2021, 2:17 PM
Thanks. Now I understand why 🙂
2 Views