Since I'm also new to IntelliJ IDEA, I'm wondering...
# multiplatform
s
Since I'm also new to IntelliJ IDEA, I'm wondering if someone could explain me the differences between these various options of Kotlin Projects: - Multiplatform Library | Gradle - Mobile Android/iOS | Gradle - Mobile Shared Library | Gradle Based on the descriptions, the differences seem subtle. Thread in Slack Conversation
k
1. library with various targets included (i think jvm, js, and one other), 2. Android & iOS apps with multiplatform library & targets for both, 3. similar to 2 w/o the app projects
s
Thank you @Kris Wong. Looks like it's between 1 or 3 for me since I don't need the app projects for now. I'll probably try 3 and adjust from there.
k
if you're targeting mobile then pick 3, otherwise 1
s
Yeah, potential clients (consumers) of the library would be Android native (Kotlin, Java), iOS native (Swift, Objective-C) and cross-platform (Xamarin, React Native), so I'll pick 3.
b
Ultimately, the k/n toolchain has to use the xcode toolchain to build an arm64 / x86_64 framework native binary for use in the iOS app. Does that clarify?
k
yeah, it's not magic, it doesn't replace the iOS dev tools. it uses them.
it does the same for Android, but that works on windows 🙂
💡 1
s
Yeah ok, that makes sense. Not familiar with the concept of "toolchain", will have to look it up.
b
just a loose term for collection of tools designed to work together. apple actually uses it more concretely in their builds, but that's not super relevant
a
Also Windows targets require Windows host, Linux MIPS targets require Linux host, Android Native x64 require Linux or Mac OS hosts
b
👍 i also use CI for this (but the reverse for building windows)
👍 1
b
You can always build on docker
I'm developing on linux, and building for windows via windows docker image
k
i assume you're familiar with source control?
i.e., git
s
Yes, we're actually using Git.
k
i'm not sure what the issue is, then?
x
I like to keep our MP project in its own git repository. When it’s built, it generates a .jar and a .framework for Android and iOS respectively. IMO this is the cleanest way of doing MP. I don’t like how many tutorials out in the wild tie MP in so tightly with Android.
Yeah
The Android and iOS projects get their own respective git repos too
s
Ok, so you have 3 repos total: MP, Android, iOS?
x
Yea