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

hmole

09/29/2018, 10:55 AM
How can I write platform native code for multiple targets?
nativeCommonMain
source set isn't resolving imports from stdlib-native. Only specific targets like iosX64/iosArm64 work. Idea
2018.2.4
Kotlin
1.3.0-rc-116
my setup
Copy code
sourceSets {
    commonMain {
      dependencies {
        implementation 'org.jetbrains.kotlin:kotlin-stdlib'
      }
    }
    nativeCommonMain {
      dependencies {
        dependsOn commonMain
      }
    }

    configure([iosX64Main, iosArm64Main]) {
      dependsOn nativeCommonMain
    }
  }
l

Liliia

10/01/2018, 10:03 AM
Is it what you are searching for? https://youtrack.jetbrains.com/issue/KT-26968
h

hmole

10/01/2018, 12:53 PM
I'm not sure, because I'm talking only about common native code, no interops. Just the ability to reference things as
kotlin.native.concurrent.AtomicReference
from "common native module". Maybe I'm doing something wrong and you can already do that.
l

Liliia

10/01/2018, 4:01 PM
Seems like that’s the case then. Not supported yet 😞
2 Views