Platform module

A platform module contains the implementations of platform-dependent declarations in the common module for a specific platform, as well as other platform-dependent code. It is always an implementation of a single common module.

It can depend on any modules and libraries available on the given platform. This means that Java libraries can be used with Kotlin/JVM, and JS libraries with Kotlin/JS.

Upon compiling a platform module, it produces target-specific code (either JVM bytecode or JS source code) for the code in the platform module, as well as the common module that it implements.

There are several other languages targeting JVM; therefore, the platform modules targeting Kotlin/JVM can also contain code in Java and other ...

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.