https://kotlinlang.org logo
k

Kirill Zhukov

07/03/2019, 11:56 PM
Very new to Kotlin multiplatform. When adding MPP dependency do I need to specify platform (e.g. “jvm”) in the dependency or is Gradle smart enough to recognize that I have a jvm project thus I will need jvm artifact of that MPP dependency?
k

kpgalligan

07/04/2019, 12:28 AM
You’ll need
enableFeaturePreview('GRADLE_METADATA')
on the project, and the dependency needs to have been published with metadata, but then you should be able to put the dependency in the common definition and gradle will pick the right one (assuming it exists)
🤔 1
☝️ 1
👍 1
“the dependency needs to have been published with metadata” I think they pretty much all are now, but going back a few months some had platform-specific definitions