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

Sam Garfinkel

04/11/2020, 7:31 PM
Are
project(":foo")
style dependencies supported when the callee is a
kotlin("jvm")
project and the project
foo
is a multiplatform project?
d

Dominaezzz

04/11/2020, 7:33 PM
Yes! I'm doing this myself.
s

Sam Garfinkel

04/11/2020, 7:34 PM
What if that
foo
is just a common module? It’s literally just annotations in my case.
Nevermind, I forgot to register the mpp as a jvm project (doh)
r

russhwolf

04/11/2020, 7:59 PM
I’ve seen some things fail to resolve in IDEA when you do that but it builds from gradle. https://youtrack.jetbrains.com/issue/KT-29082
a

araqnid

04/13/2020, 12:08 PM
I had to explicitly add a “org.jetbrains.kotlin.platform.type” attribute to my jvm “callee” subproject in order to avoid a Gradle “unable to pick variant” issue (whereas the js dependent subproject was fine)
r

russhwolf

04/13/2020, 1:03 PM
That's probably a different issue. When you have multiple targets of the same platform type, you need to disambiguate. That's true regardless of whether it's a project dependency. https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#disambiguating-targets
☝🏼 1