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

thana

11/19/2019, 9:08 AM
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

tylerwilson

11/19/2019, 1:21 PM
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

Andy Gibel

11/19/2019, 4:10 PM
+1 for the cocoapods approach. It seems to be rare
t

thana

11/19/2019, 4:14 PM
i'd be already glad if i knew how to get my tests running again using the
js{nodejs{testTask}}
syntax
d

Dave

11/19/2019, 9:27 PM
cocoapods approach works through IntelliJ's Kotlin/MPP template:
t

thana

11/20/2019, 10:10 AM
thx
f

Fabio Bombardi

11/26/2019, 10:35 AM
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

Andy Gibel

11/26/2019, 12:16 PM
@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

Fabio Bombardi

11/26/2019, 12:27 PM
Hi @Andy Gibel ! Thanks, I’ll give it a try for sure!
d

Dave

11/26/2019, 3:48 PM
@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

Fabio Bombardi

11/26/2019, 5:56 PM
🤔 @Dave What's your IntelliJ version? Either with 2019.2 and 2019.3 RC I see a totally different template
d

Dave

11/26/2019, 6:02 PM
maybe community vs. ultimate?
or 2.4 vs 3
f

Fabio Bombardi

11/26/2019, 6:03 PM
Nope... I guess the first one! ^^
Ultimate vs Community
d

Dave

11/26/2019, 6:03 PM
😕
f

Fabio Bombardi

11/26/2019, 6:04 PM
I'm a cinderella man 😢
xD
😄 1
Thanks for helping me figuring this out [-;
d

Dave

11/26/2019, 6:06 PM
of course.
f

Fabio Bombardi

11/28/2019, 4:03 PM
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

Dave

12/02/2019, 2:48 PM
@Fabio Bombardi you found it! great to hear, i had no idea why you weren't seeing the same thing as me.