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

pajatopmr

10/19/2018, 12:02 PM
Next question for me is how to organize my source code repos. The initial setup from Intellij (EAP) seems to build a monolith project to contain all the top level code (common, Android and iOS) in a single place (minus libraries). I’m guessing this is important for Gradle. I suspect one way to use multiple repos is to use git sub-projects. Is there a better way?
j

Jaroslav

10/19/2018, 12:04 PM
you can build your shared code into libraries and use them in android and ios projects using maven and cocoapods
p

pajatopmr

10/19/2018, 12:06 PM
Can the libraries be multiplatform such that Gradle can figure out how to build the Android and iOS apps correctly?
j

Jaroslav

10/19/2018, 12:13 PM
in your “main” project you build libraries -
.framework
for ios and I think jar for android. They are more or less separate things (built from the same code). Then you have two other projects
ios
and
android
which import those builded libraries
p

pajatopmr

10/19/2018, 12:13 PM
Just found the multiplatfom library documentation which answers my second question.
Yes is the answer. Thanks.