Docs
Documentation
The commands, settings and reference for the rn2kmp Gradle plugin and compiler.
On this page
The documentation covers the commands. For the decisions behind a migration, read the migration guide. For projects to run, see the demos.
Getting started
Set up the two projects and run your first exports.
Installation
Apply the Gradle plugin and install the generated package.
Annotations
Export functions, types and Compose components.
Supported types
Look up Kotlin-to-TypeScript mappings and compiler limits.
Configuration
Set package coordinates and the Expo Android Kotlin version.
Troubleshooting
Fix common installation and build problems.
Repositories#
| Repository | Role |
|---|---|
gradle-plugin |
The Gradle plugin you apply in your Kotlin Multiplatform module. It runs the compiler and sets up the module. |
compiler |
The annotations, the KSP processor, and the TypeScript, Android and iOS backends. |
demo |
The minimal plugin setup with a Kotlin function and a Compose component. |
demo-pokedex |
A migration example with switchable screens and Expo Router navigation. |
Most projects only use the plugin. The compiler is used through it.
The reference READMEs#
The READMEs of the repositories are the reference for every setting and task, and they are versioned with the code:
- Gradle plugin README: setup, settings, tasks, and where the generated package must live.
- Compiler README: how the compiler works, what gets generated, the type mapping and the limitations.