Multiplatform Kotlin
A Kotlin multiplatform project allows you to compile the same code for multiple target platforms. Currently, supported target platforms are JVM and JS with Native, which is still under development and will be added later.
Note
Multiplatform Kotlin is still under review, similarly to Kotlin Native.
Project structure
A multiplatform project consists of three types of module—a common module, a platform module, and a regular module. Let's look at them in detail.
Common module
AÂ common
 module contains platform-independent code, meaning it is not specific to any platform, as well as declarations without the implementation of platform-dependent APIs. Those declarations allow common code to depend on platform-specific implementations. This module is shared across other modules and is common between them, hence the name common.Â
A common
module can depend only on other common
modules and libraries, including the kotlin-stdlib-common
 Kotlin standard library .Â
A special metadata file...