How can I write platform native code for multiple ...
# multiplatform
h
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
Is it what you are searching for? https://youtrack.jetbrains.com/issue/KT-26968
h
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
Seems like that’s the case then. Not supported yet 😞