e

    edwinRNDR

    1 year ago
    I have a multi module project in which some submodules are mpp and some are jvm only (with the classic non-mpp project layout). I noticed that the jvm submodules are not published by
    publishJvmPublicationToMavenLocal
    . I suspect this behavior is introduced in Kotlin 1.5.0. How do I get the jvm modules to publish, or is turning all submodules into mpp a better option?
    rnett

    rnett

    1 year ago
    publishJvmPublicationToMavenLocal
    is added my the multiplatform plugin to publish JVM only (it's generated per source set), the JVM only projects are published w/
    publishToMavenLocal
    . You can add
    publishJvmPublicationToMavenLocal
    to the JVM only projects and link up the tasks manually, or just use the top level
    publishToMavenLocal
    .
    Big Chungus

    Big Chungus

    1 year ago
    Did you add maven-publish plugin to jvm module?
    Javier

    Javier

    1 year ago
    And you have to create a maven publication, jvm plugin is not doing it by default, kmp plugin does
    e

    edwinRNDR

    1 year ago
    fair points, I do have maven-publish added and publishToMavenLocaldoesn't publish the jvm submodules either
    Big Chungus

    Big Chungus

    1 year ago
    As Javier said, JVM plugin doesn't automatically configure your publications (as opposed to multiplatform plugin). Either use mpp plugin with jvm target only or configure maven publication manually