https://kotlinlang.org logo
r

Riccardo Montagnin

02/28/2019, 8:31 AM
Hello everyone. Is it possible to create a multiplatform project that shares code between a JVM, Android and iOS implementations? I've only found tutorials on how to create a JVM/JS/Native or Android/iOS multiplatform project, but nothing like Android/iOS/JVM and was wondering if that's supported
👌 5
Inside IntelliJ New Project window what should I go for? 1. Multiplatform Library 2. Mobile Android/iOS
r

ribesg

02/28/2019, 8:42 AM
For now you should start with an empty Gradle project with Kotlin DSL and start to learn how it works from examples, as MPP still needs some work
n

nestserau

02/28/2019, 8:42 AM
It doesn’t matter as much, because either one or the other platform will be missing out for you in those templates. It all depends on your
build.gradle
which you can adjust at any time.
r

Riccardo Montagnin

02/28/2019, 8:48 AM
I was thinking about starting from here maybe: https://github.com/bugsnag/kotlin-multiplatform-example
s

Sabrina Namur

02/28/2019, 8:48 AM
I made a sample project with ios/android/web and a server, if you want you can look: https://github.com/compeople/kotlin-multiplatform-sample
r

Riccardo Montagnin

02/28/2019, 8:49 AM
Thank you very much Sabrina!
2 Views