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

Dominaezzz

11/20/2019, 3:51 PM
So I've included,
Copy code
testImplementation(kotlin("test-common"))
    testImplementation(kotlin("test-annotations-common"))
    testImplementation(kotlin("test"))
    testImplementation(kotlin("test-junit"))
(which works for multi-platform) in my Kotlin/JVM project but I can't resolve the
kotlin.test.Test
annotation. Is this not supported?
j

jw

11/20/2019, 3:57 PM
it's typealias'd to
org.junit.Test
on the JVM
d

Dominaezzz

11/20/2019, 3:59 PM
org.junit.Test
resolves fine but it seems I can't use the alias. (I like my code to be back-end agnostic when I can help it). I'll give this up for now.
j

jw

11/20/2019, 4:00 PM
it's not just a typealias, it's an
expect typealias
so there is no
kotlin.test.Test
in the JVM artifact to use
d

Dominaezzz

11/20/2019, 4:01 PM
Ahhhh! That sorta makes sense now.
i

ilya.gorbunov

11/20/2019, 7:42 PM
There's no such thing as
expect typealias
, it could be either
expect class/interface/whatever
or
actual typealias
j

jw

11/20/2019, 7:44 PM
er, yeah. that's what i meant. i had typed out
expect annotation ..
and
actual typealias ...
and then decided it was too long and deleted a bunch of text and combined the wrong things
i

ilya.gorbunov

11/20/2019, 7:45 PM
@Dominaezzz You shouldn't mix common and jvm dependencies in a single target dependencies block, perhaps it causes ambiguity between expect/actual
kotlin.test.Test
that is reported as unresolved reference.
d

Dominaezzz

11/20/2019, 7:46 PM
Hmm, I'll try that.
2 Views