KMP on a real app: the first shared module
We just shipped our first Kotlin Multiplatform module in a real app. It's small — models, validation, and a bit of networking — but it's in production. What I'd tell someone starting: Start with a module that has no UI dependencies Write the tests in shared code from day one Keep platform-specific code behind interfaces, not expect/actual everywhere The biggest win was validation: one implementation, same behavior on both platforms, one place to fix bugs. The biggest surprise was build times. They're noticeable, and they add up in CI. Next step is sharing some state-management logic. I'm being cautious about that one — UI-adjacent code is where shared modules get messy.
We just shipped our first Kotlin Multiplatform module in a real app. It's small — models, validation, and a bit of networking — but it's in production.
What I'd tell someone starting:
- Start with a module that has no UI dependencies
- Write the tests in shared code from day one
- Keep platform-specific code behind interfaces, not
expect/actualeverywhere
The biggest win was validation: one implementation, same behavior on both platforms, one place to fix bugs.
The biggest surprise was build times. They're noticeable, and they add up in CI.
Next step is sharing some state-management logic. I'm being cautious about that one — UI-adjacent code is where shared modules get messy.