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

Dmitri Sh

11/03/2019, 6:22 PM
What's the status on watchOS target? Looks like 1.3.60 will support it (https://github.com/JetBrains/kotlin-native/blob/671da8181cb729dca449cc597dc6c89d4f429b73/CHANGELOG.md) ? Will there be a sample project published?
m

marstran

11/03/2019, 6:25 PM
d

Dmitri Sh

11/03/2019, 6:39 PM
I saw that - but it doesn't look like a reference standalone project - in any case, I tried it and I am not able to compile, all kinds of errors, too many to list here. And the build setup (https://github.com/JetBrains/kotlin-native/blob/master/samples/watchos/build.gradle.kts) is wildly different from their iOS/android reference project - https://github.com/Kotlin/mpp-example/blob/master/greeting/build.gradle
a

Artyom Degtyarev [JB]

11/05/2019, 11:26 AM
Hello @Dmitri Sh! Please note, that
mpp-example
is out-of-date at the moment, while
watchos
is not released yet. Also, it would be nice if you can share the errors and difficulties you faced with this sample - every feedback matters, especially for new stuff like that.
d

Dmitri Sh

11/06/2019, 3:36 AM
Apologies, I don't remember much at this point and I removed the project so cannot check back. But I do remember two things - the first error I got after compiling for maybe 40 mins - I googled and found this command - ./gradlew clean dist crossDist - that fixed that first issue, but then ran into other problems and given that it took good thirty minutes or so before problems surfaced, I just gave up
I hope you guys will publish a reference project that targets both iOS and watchOS!!!
a

Artyom Degtyarev [JB]

11/06/2019, 7:45 AM
Oh, I see. It looks like you smashed into the fact that these samples use the compiler built from sources. Maybe removing a line
org.jetbrains.kotlin.native.home=<...>
from all
gradle.properties
files will make it less painful - and less time-wasting, as you have no goal to build the compiler, only to play with the example. Please give this method a try and ping here if something will go wrong again.
d

Dmitri Sh

11/09/2019, 5:22 AM
maybe sometime next week when I feel adventurous 🙂