russhwolf
12/15/2019, 2:10 AMwatchosArm64
target sets typealias NSInteger = Int
, similar to 32-bit targets, rather than typealias NSInteger = Long
the way other 64-bit targets do. Is this deliberate or an oversight?basher
12/15/2019, 2:17 AMrusshwolf
12/15/2019, 2:21 AMrusshwolf
12/15/2019, 2:22 AMkonanTarget.architecture.bitness
to determine integer size but I guess I have to special case watchosbasher
12/15/2019, 2:36 AMolonho
12/15/2019, 9:59 AMrusshwolf
12/15/2019, 2:09 PMplatform.Foundation
APIs that are exposed as NSInteger
. I’m trying to maintain a shared appleMain
source-set that handles most of that logic, but there’s a couple spots where I need to `expect`/`actual` into 32-bit and 64-bit sources depending on whether NSInteger
is a Kotlin Int
or a Long
. Currently I’m using convert()
to handle that but I’ve realized it doesn’t actually work for my use-case the way I thought it did.russhwolf
12/15/2019, 2:13 PMtargets
.withType<KotlinNativeTarget>()
.matching { it.konanTarget.family.isAppleFamily }
.configureEach {
if (konanTarget.architecture.bitness == 32) {
compilations["main"].defaultSourceSet.dependsOn(apple32Main)
compilations["test"].defaultSourceSet.dependsOn(apple32Test)
} else {
compilations["main"].defaultSourceSet.dependsOn(apple64Main)
compilations["test"].defaultSourceSet.dependsOn(apple64Test)
}
}
But it’s not enough to just check bitness
. I need to also send watchOS targets to the first branch.russhwolf
12/15/2019, 2:14 PM