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

orangy

12/06/2018, 8:30 PM
📣 multiplatform library sample with testing and publishing (unofficial) https://github.com/orangy/multiplatform-lib It runs tests for jvm, js & native and can publish it to bintray and likely to maven central (didn’t try it myself). Hope it helps you set up your project for testing & distribution. Feel free to ask questions in a thread.
😍 3
🤘 3
🏆 3
❤️ 1
👍 12
t

thevery

12/06/2018, 10:02 PM
Please add iOS (including simulator) and Android
3
o

orangy

12/07/2018, 5:49 AM
I will add iOS (I have some non-pretty code here https://github.com/orangy/lanark/blob/master/playground/build.gradle), but I don’t have an Android so maybe someone can contribute?
t

thevery

12/07/2018, 7:36 AM
I can add some Android but not earlier than monday. Do you need help with publishing or sample app itself?
o

orangy

12/07/2018, 7:41 AM
It’s not about an app, but rather a library. I’d appreciate setting up an Android target, together with tests and publishing.
m

msink

12/07/2018, 9:07 AM
AFAIK Android requires gradle 4.10+, and Native requires 4.7 (exactly)
a

addamsson

12/07/2018, 9:26 AM
I'll try this out on my project on the weekend!
j

jdemeulenaere

12/07/2018, 8:11 PM
The same with a .kts gradle build file would be nice 🙂
o

orangy

12/07/2018, 8:17 PM
New mpp gradle doesn’t support kts yet, but we’re working on it
d

Dico

12/08/2018, 2:22 PM
I've been able to set up a multiplatform project purely in kotlin dsl with a multi-level hierarchy and 24 source sets. Yes it was difficult and I ran into a nasty bug, but the build code is clean and works well. I use the kotlin dsl for all my projects. I don't experience the problem you're talking about. However, I can't speak for many plugins. Only JB made plugins and a select few others.
g

gildor

12/08/2018, 2:37 PM
I don’t experience the problem you’re talking about.
I’m talking about “difficult” and “a nasty bug”. I know this is possible, it was officially “not supported” It’s nice! Looking into Kotlin 1.3.20
d

Dico

12/08/2018, 2:39 PM
Oh, okay. Interesting. What do dynamic functions look like in kotlin dsl?
g

gildor

12/08/2018, 3:03 PM
you just cannot call fromPreset, this function is not available. https://youtrack.jetbrains.com/issue/KT-28635
d

Dico

12/08/2018, 3:04 PM
I think I'm using that.. Let me check
Ah, I implemented it myself. Never mind
g

goncalossilva

12/09/2018, 2:21 AM
@orangy I'm having an issue with a multiplatform lib where common tests are ignored by the JVM. Decided to clone your repo (thank you 🙌) and try it out, but the result is the same. Using
./gradlew jvmTest
, no JVM tests run, although it says "BUILD SUCCESSFUL". 😕 Any hints?
JS and Native runs like a charm.
o

orangy

12/09/2018, 10:27 AM
Does it run them with
cleanJvmTest jvmTest
? Gradle tries to not run tests, if possible on JVM
g

goncalossilva

12/09/2018, 2:10 PM
Hum, it does! 🤔
2 Views