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

robstoll

11/24/2018, 8:34 PM
I have a multi-platform project with jvm, android and js as target platforms. JVM and Android share the most code though. For instance, a class A defined in the common module as
expect
is the same in jvm and android. Is there a way to share the common code only for certain platforms?
l

Liliia

11/26/2018, 11:49 AM
There is a bunch of issues for support of such configurations: https://youtrack.jetbrains.com/issue/KT-27801 I believe your case is somewhat close to https://youtrack.jetbrains.com/issue/KT-28194 or https://youtrack.jetbrains.com/issue/KT-27816. Currently, there is no way to do it so the IDE wouldn’t complain, but Gradle builds successfully such configurations as this: https://github.com/wild-lynx/k-new-mpp-samples/blob/master/split-actuals/build.gradle
4 Views