# How to publish multi-platform libraries?

**URL:** <https://discuss.kotlinlang.org/t/how-to-publish-multi-platform-libraries/8995>\
**Category:** Libraries\
**Created:** [August 10, 2018, 5:08pm UTC](https://discuss.kotlinlang.org/t/how-to-publish-multi-platform-libraries/8995 "2018-08-10T17:08:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bartblast](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/bartblast/32/5428_2.png) [@bartblast](https://discuss.kotlinlang.org/u/bartblast)\
**Post date:** [August 10, 2018, 5:08pm UTC](https://discuss.kotlinlang.org/t/how-to-publish-multi-platform-libraries/8995/1 "2018-08-10T17:08:15Z")

</div>

Hey, I’m working on an isomorphic web framework for Kotlin. Can somebody point me to any docs which describe how to publish libraries for multi-platform projects? The only docs I’ve found describe the process of publishing libraries targeting JVM.

---

<div class="post-metadata">

**Author:** ![Wasabi375](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/wasabi375/32/4741_2.png) [@Wasabi375](https://discuss.kotlinlang.org/u/Wasabi375)\
**Post date:** [August 10, 2018, 5:16pm UTC](https://discuss.kotlinlang.org/t/how-to-publish-multi-platform-libraries/8995/2 "2018-08-10T17:16:45Z")

</div>

I don’t know about any docs and I have not published multiplatform projects myself but I am pretty sure you do it just the way you publish for JVM. You just need to publish each of your gradle projects (common, jvm, js).

You could also take a look at the build files for some of the kotlin internal projects. The of kotlinx.serialization seems to be easy to understand: [kotlinx.serialization/build.gradle at master · Kotlin/kotlinx.serialization · GitHub](https://github.com/Kotlin/kotlinx.serialization/blob/master/build.gradle)

---

<div class="post-metadata">

**Author:** ![bartblast](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/bartblast/32/5428_2.png) [@bartblast](https://discuss.kotlinlang.org/u/bartblast)\
**Post date:** [August 10, 2018, 6:25pm UTC](https://discuss.kotlinlang.org/t/how-to-publish-multi-platform-libraries/8995/3 "2018-08-10T18:25:08Z")

</div>

Thanks! I’ll take a look at it.

---

<div class="post-metadata">

**Author:** ![cretz](https://avatars.discourse-cdn.com/v4/letter/c/d2c977/32.png) [@cretz](https://discuss.kotlinlang.org/u/cretz)\
**Post date:** [August 11, 2018, 1:20am UTC](https://discuss.kotlinlang.org/t/how-to-publish-multi-platform-libraries/8995/4 "2018-08-11T01:20:48Z")

</div>

Here’s one of my projects that I publish for multiple platforms: [GitHub - cretz/pb-and-k: Kotlin Code Generator and Runtime for Protocol Buffers](https://github.com/cretz/pb-and-k) (see the runtime sub project). It doesn’t include a Kotlin Native version though one is planned (sorry, JetBrains doesn’t make it easy to develop for all 3 platforms in the same IDE).

---

<div class="post-metadata">

**Author:** ![bartblast](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/bartblast/32/5428_2.png) [@bartblast](https://discuss.kotlinlang.org/u/bartblast)\
**Post date:** [August 11, 2018, 2:29pm UTC](https://discuss.kotlinlang.org/t/how-to-publish-multi-platform-libraries/8995/5 "2018-08-11T14:29:08Z")

</div>

Thanks @cretz!
