# Publish a Kotlin/Multiplatform library on Maven Central

DevFeed: [Publish a Kotlin/Multiplatform library on Maven Central](<https://devfeed.tech/articles/publish-a-kotlin-multiplatform-library-on-maven-central-22865.md>)

Original publisher: [Read original article](<https://medium.com/kodein-koders/publish-a-kotlin-multiplatform-library-on-maven-central-6e8a394b7030?source=rss----f311f45ef54---4>)

Author: Romain Boisselle

Published: 2021-03-09T15:02:47Z

Content type: tutorial

Language: en

Sources: [Kodein Koders - Medium](<https://devfeed.tech/sources/kodein-koders-medium.md>)

Topics: [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [Maven Central](<https://devfeed.tech/topics/maven-central.md>), [Tutorial](<https://devfeed.tech/topics/tutorial.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [dependencies](<https://devfeed.tech/tags/dependencies.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [maven-central](<https://devfeed.tech/tags/maven-central.md>), [maven-plugin](<https://devfeed.tech/tags/maven-plugin.md>), [releases](<https://devfeed.tech/tags/releases.md>), [sonatype](<https://devfeed.tech/tags/sonatype.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

## AI overview

This tutorial explains how to publish a Kotlin Multiplatform library to Maven Central. It covers migrating from Bintray and JCenter, Maven Central's requirements for sources, documentation, POM files, and signatures, and the staging-repository complications that arise in multiplatform builds.

## Source excerpt

https://medium.com/media/1f069bfe70a66ec0f8528588ae5ee209/href In our last tutorial, Salomon showed you how to create a Kotlin Multiplatform Mobile library. Now that we have some code ready to be used by the community, let me show you how to publish your future releases to Maven Central. Before going into details about how to deploy your libs to Maven Central, I want to adress library developers who already have a library published on JCenter. This tutorial is also for you! Publishing on Bintray and JCenter was a choice most of us made, because it had less constraints and more flexibility. Now that they will be shutting down quite soon, we must migrate our publication workflow. Maven Central seems to be the right choice these days, but we need to deal with new requirements. Where Bintray was giving us some latitude on what we could upload and publish, Maven Central has always been more restrictive. Indeed, every uploaded artifact needs to be accompanied at least by the following items: A bundle of the sources of the artifact The documentation that goes with the artifact, in the JVM world this is the Javadoc. A well formatted POM file. For those who are not familiar with Maven, this is the description of your project, with its name, its version, its dependencies, etc, in an XML format And finally, every item needs to be signed to be accepted. Actually, these requirements are not that hard to fulfill, and Gradle provides almost everything we need to publish our artifacts smoothly, with 2 official plugins, maven-publish and signing. But... I told you : almost! When performing a publication, before being available on Maven Central, all your uploaded artifacts with maven-publish are generally stored and referenced in one staging repository that you need to validate as the final step of publishing. While this is true for standard JVM projects, this is not the case for Kotlin/Multiplatform ones. As Kotlin/Multiplatform developers, you may know that you need two machines to b