Thread
#multiplatform
    k

    Kirill Zhukov

    3 years ago
    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?
    kpgalligan

    kpgalligan

    3 years ago
    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)
    “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