is there any current documentation about how to se...
# multiplatform
t
is there any current documentation about how to set up an mpp nowadays? https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html seems to be pretty putdated
t
I would love to see the project templates in IntelliJ, AppCode, etc updated to the latest ‘approved’ way to set up MPP projects. But not just the trivial one, but with at least one third-party dependency like ktor or serialzation (so that we can see the construction of dependencies), and with tests enabled for all platforms. And if targeting iOS, using the built-in cocoapods feature (I still see so many uses of the old manual framework approach).
a
+1 for the cocoapods approach. It seems to be rare
t
i'd be already glad if i knew how to get my tests running again using the
js{nodejs{testTask}}
syntax
d
cocoapods approach works through IntelliJ's Kotlin/MPP template:
t
thx
f
Why doesn't kotlin mpp [hands on](https://play.kotlinlang.org/hands-on/Targeting%20iOS%20and%20Android%20with%20Kotlin%20Multiplatform/01_Introduction) ios/android show how to use android platform specific libraries? (e.g.
android.os.*
). The way is made I can use only jvm libraries 'cause it's not an android library...
@Dave I've tried the template you said but It doesn't seem to add cocoapods setup in build.gradle and there's no podfile in iosApp folder. I'm also trying to have a standard template of kotlin mpp to share code between android and ios but still I cannot find one. And I still see many projects using groovy and not kotlin dsl for kotlin mpp module.
a
@Fabio Bombardi check out moko-template. It's nonstandard in that it uses their plugin but still helpful. Not sure if they updated to 1.3.60 yet #moko
f
Hi @Andy Gibel ! Thanks, I’ll give it a try for sure!
d
@Fabio Bombardi this is what i see from that template: https://cl.flycl.ps/L1uYLGj4
entirely possible you're not seeing the same behavior, but i'm pretty new to this so i can't help debug it too much, sadly.
f
🤔 @Dave What's your IntelliJ version? Either with 2019.2 and 2019.3 RC I see a totally different template
d
maybe community vs. ultimate?
or 2.4 vs 3
f
Nope... I guess the first one! ^^
Ultimate vs Community
d
😕
f
I'm a cinderella man 😢
xD
😄 1
Thanks for helping me figuring this out [-;
d
of course.
f
Hey @Dave do you know what? I've tried IntelliJ Ultimate 2.4 (your same version — trial) but using
Mobile Android/iOS
template I still see a template without cocoapods gradle task. Maybe do you have an additional plugin? Anyway I've found my simplest template by wrapping the one from hands-on with android-gradle (all with kotlin dsl
.kts
gradle files). Its enough for me now even without cocoapods. I'm just curious how come you see a totally different tamplate...
d
@Fabio Bombardi you found it! great to hear, i had no idea why you weren't seeing the same thing as me.