|
|
|
|
|
by pjmlp
168 days ago
|
|
Kind of, because this always has to go via JNI in the end, given that 80% of the API surface is only exposed via Java. These efforts are always to celebrate, however they always end up with leaky abstractions. Just like on the other way around one needs to be aware of Objective-C for success, or .NET/COM on Windows. |
|
You get (1) access to JVM APIs as normal on Android, and (2) Fairly full-featured interop with ObjC, Swift and C APIs elsewhere, and (3) A pleasant language with excellent IDE support in IntelliJ.
The `expect fun` / `actual fun` stubbing for different platforms also works in a fairly low-drama way. You can also share UI with Compose Multiplatform (less mature), or just write native views.
The downside (of course) is that non-JVM targets like iOS can't use the JVM ecosystem, and most of the Kotlin ecosystem assumes Kotlin/JVM. This is slowly changing though, and isn't a structural flaw.
Also, you're going to end up with Gradle in your toolchain, which will torture your poor soul.