robjperez
08/09/2021, 10:42 AMifdef
?Karel Petránek
08/09/2021, 12:05 PMrobjperez
08/09/2021, 12:11 PMrobjperez
08/09/2021, 12:11 PMKarel Petránek
08/09/2021, 12:18 PMrobjperez
08/09/2021, 12:21 PMrobjperez
08/09/2021, 4:32 PMKarel Petránek
08/09/2021, 7:15 PMkotlin {
iosArm64() {
binaries {
framework() {
embedBitcode("bitcode")
}
}
}
iosX64() {
binaries {
framework() {
embedBitcode("bitcode")
}
}
}
sourceSets {
iosMain {
dependsOn(commonMain)
iosX64Main.dependsOn(it)
iosArm64Main.dependsOn(it)
}
// These two should be implicit, just in case
iosX64Main {}
iosArm64Main {}
}
}
robjperez
08/11/2021, 9:28 AMval iosTarget: (String, KotlinNativeTarget.() -> Unit) -> KotlinNativeTarget =
if (System.getenv("SDK_NAME")?.startsWith("iphoneos") == true)
::iosArm64
else
::iosX64
iosTarget("ios") {}
I get a lot of errors in the Android studio iderobjperez
08/11/2021, 9:29 AMKarel Petránek
08/11/2021, 10:37 AMboolean isIdeaSyncing = System.getProperty('idea.sync.active') != null
kotlin {
if (isIdeaSyncing) {
iosX64("ios") {
}
} else {
iosArm64() {
}
iosX64() {
}
}
...
}
robjperez
08/11/2021, 12:16 PMrobjperez
08/11/2021, 12:18 PMexpect
function in iosMain
and actual
implementations in iosX64Main
and iosArm64Main
folders. (don’t forget to put everything in the same package!)
I tried putting the expect
in commonMain
but that does not workKarel Petránek
08/11/2021, 1:39 PM