Release multiplatform artifacts


is there a suggested way to release multiplatform proejcts yet?

I haven’t seen anything in the docs.

Lets say I have a common project and a project for each platform:

|____ JVM
|____ Android
|____ Native
|____ Javascript

for all the JVM stuff (JVM and Android) I can obviously use jcenter/mavencentral, but how can I distribute artifacts for JavaScript and Native, so that I can download(!) and use them in other projects?

1 Like

I’m not sure, I only experimented with native and java script a little bit, but as far as I remember you can also use jcenter/mavencentral for that as long as you import them into kotlin projects. I remember experimenting with it on some small local stuff although I did not use multiplatform with native or android, just jvm and js. I justed used the normal MavenPublish in gradle so I could use gradle publishToMavenLocal. I used different artifact ids for each of the different platforms so I published once for common (“someName-common”) once for jvm and js (“someName-jvm”, “someName-js”).
I’m not sure if this is the best or intended way to do this. As I said, this was just for some hacky experiment which I would not publish the way I did it :slight_smile:

Any news? Kinda interested as well…

Oh wait nvm, JetBrains is at it while we are talking :slight_smile:

I have been experimenting with making a multiplatform project, and I was successful to compile my Kotlin code (from the common module) into a CommonJS Javascript artifact, and this can be distributed via npm. I am going to write a post about it when I’m finished, right now I am struggling with getting documentation into the Javascript artifact, so it is not very nice for other people to use it.

I hope I understand correctly what you are looking for.