https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
e

edenman

04/20/2020, 11:21 PM
is there not a task to just run tests in
commonTest
? I see gradle tasks for the various platforms (
jvmTest
,
jsTest
, etc) but nothing for just running
commonTest
also if I run
jvmTest
i get this compilation error on my test in `commonTest`:
Unresolved reference: Test
e

emmano

04/21/2020, 12:04 AM
common tests need to be ran in a specific platform.
When you create tests in common your are essentially creating tests for functionality that will be shared across platforms hence it makes sense that common tests need to be ran in each platform you are targeting
e

edenman

04/21/2020, 12:09 AM
ok gotcha, that makes sense, thanks
g

gmazzo

04/21/2020, 8:14 AM
Regarding this topic, does anyone know how to share
tests
between two MP modules? I mean, given
A
and
B
, both MPP, to
B
’s
commonTest
to have all clases defined in `A`’s
commonTest
for instance. I’m playing around Gradle’s Variants but it’s not an easy task to do.
k

Kris Wong

04/21/2020, 12:57 PM
i am not aware of a way to share code across modules other than creating a shared library