

But otherwise, you can build your library on any operating system. If you want your library to support iOS or macOS targets, you need a macOS to build the native artifacts.Here you will find a combination of the most relevant existing content and additional information, which should answer all your questions. They all provide useful and up-to-date instructions, but they don't fully cover the bumpy, winding road that is the publishing process. ℹ️ Disclaimer: This tutorial is based on official documentation and other existing articles. There is lots to do, so let's get started!

Finally, we will publish your library in MavenCentral so that it will become available to developers all over the world! Next, we will set up the mechanism for publishing your project so you'll be able to configure, sign, and publish a library by calling a single Gradle task. 🤔 If you are feeling a little confused with all the new Maven terminology we are throwing around – it's okay! Here’s a useful twitter tip, which might help! Finally, in the last part of the series, we will register a Sonatype account that is needed to publish your library to MavenCentral. In the next part, we will also discover published artifacts to get an understanding of the multiplatform publishing format. If you already have a project you want to publish, you can jump directly to the final step of this part – publishing the library to the local Maven repository to make sure that everything works correctly. Such a library can be used in any KMM ( Kotlin Multiplatform Mobile) or other Kotlin Multiplatform projects. In the first part of the series we are going to create a multiplatform library that uses platform APIs with expect/actual mechanism, provides a simple API to the users, and supports three targets: Native (iOS or your host machine target, depending on your choice), JVM, and JavaScript. This post will help you through the multiplatform library publishing routine giving you one less thing to worry about so that you can concentrate on the library itself 🧘🏼♀️ For example, as Bintray is shutting down in May 2021, you have to handle the Maven Central registration process and configure your library for publishing there.

But if you are publishing your library for the first time, there are some obstacles you’ll need to overcome. Of course, writing good code and providing useful API should be your top priority as a library author. Have you ever wondered about creating a multiplatform library? Now is a great time to start creating one, as there are a lot of open needs in the community and your involvement will be highly appreciated! Kotlin multiplatform technology is becoming more and more popular and the ecosystem is changing rapidly.
