The Startup
Published in

The Startup

Create a library that compiles to NPM and Jar with Kotlin Multiplatform

A tutorial of building a Kotlin project that compiles to an NPM package (for both NodeJS and browser) and a JVM Jar

Recently I started to write a simple library for unit conversion¹ for our organization. This brought up an interesting dilemma: we are using both Java and Javascript, and it is important that the conversion will be the same in all places. Writing two libraries and making sure they are functioning the same seemed not very maintainable even for such a small project.
But then I remembered: Kotlin

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alon Kashtan

I’m an experianced software architect and developer that is excited about code and sharing knowledge. My Hebrew blog: https://blog.alon-k.com/