https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
a

adiba

06/27/2019, 4:56 PM
Anyone know why IntelliJ IDEA creates mobile projects with android and shared code coupled together in the same module? https://discuss.kotlinlang.org/t/structuring-modular-android-kotlin-multiplatform-projects-intellij-idea/13238
b

Benjamin Charais

06/27/2019, 5:13 PM
This seems to be in part because of how an Android app is recognized for building. If you do not have an “app” inside with the shared code it wont compile properly for android. In my project I have a blank “app” with almost nothing in the manifest to get it to properly build for android targets that are outside of the Shared Code.
l

lenqnr

06/27/2019, 5:24 PM
I don't know why IDEA structured like that, but you can separate it. Create an empty Gradle project and add individual modules you want in the root project. Maybe Android and Kotlin Multiplatform Library.
☝️ 1