I have a multi module project in which some submod...
# multiplatform
e
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?
r
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
.
b
Did you add maven-publish plugin to jvm module?
j
And you have to create a maven publication, jvm plugin is not doing it by default, kmp plugin does
e
fair points, I do have maven-publish added and `publishToMavenLocal`doesn't publish the jvm submodules either
b
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