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.
Top comments (1)
The point about build times adding up in CI is interesting, especially when the shared module is still relatively small. The benefit of having one validation implementation across both platforms makes a lot of sense, but I can see how the feedback loop could get slower as the project grows.
I'm curious: have you found a way to keep development fast while still getting the benefits of shared tests? For example, do you run common-module tests separately during development and save the full multiplatform build for CI, or has that not been necessary yet?
Also interested in how you decide which state-management logic is safe to share versus what should stay platform-specific. That boundary seems like it could make or break the maintainability of a KMP project.