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 is generated upon compiling the common module, which contains all the declarations in the module. 

For example, let's say we need a Date object in Android, iOS, and web applications using the Kotlin Native project. All platforms ...

Get Kotlin Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.