Started a GitHub template repository for bootstrap...
# multiplatform
b
Started a GitHub template repository for bootstrapping a working mobile shared library project: https://github.com/benasher44/KotlinMobileBootstrap Not sure if something like this exists already outside of the IDEA new project template? Plan to start filling it up with examples of some of the trickier ios mpp build things I've dealt with over time (right now, just a working iOS & JVM). Working on a few things at the moment though, so it might be a bit until there are more updates. contributions welcome 🙂
👍 4
But now if I want to spin up an example to file a KT issue or try something, I just do: https://github.com/benasher44/KotlinMobileBootstrap/generate 🎉
o
Maybe add tvos too?
r
You should think about using
android()
instead of
jvm()
for the Android side. It's a bit of extra setup (
com.android.library
plugin,
android
block, add a manifest, etc) but necessary to use Android APIs instead of just Java ones in your Android sources.
b
Going to add in other options like
android
and
tvOS
. Getting started though, your life is usually easier sticking with JVM for as long as you can hold on– until you actually need to access android APIs (don't need android tools setup) 😄
r
Not sure I agree. I often see it as a point of confusion where people start in the default library template and don't understand what they need to change to access Android-specific stuff. Yes there's a bit of extra config needed, but part of the value of a template/bootstrap project is to handle that already for you. (Doesn't save you from needing to install the Android build tools though)
b
Hmm… fair point. Wanna make the first PR 🙂? otherwise, i'll get to it soonish
r
Yeah might do at some point. Probably not before the weekend though
👍 1
b
Okay updated to switch to android, and I added other iOS variants. The other apple variants are commented out with the idea that you would un-comment them to include them in your build. I think that pattern is a reasonable way to support extra configuration options