Kieren Searle
03/07/2023, 4:21 PM./gradlew build
works great too.
Once I trigger a work-around I can run from the IDE. It's just when running a clean build from the IDE that I have the issue.
Any ideas what might be causing the issue?Kieren Searle
03/07/2023, 4:25 PMlistOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach { target ->
target.apply {
compilations.getByName("main") {
cinterops {
val libmylib by cinterops.creating {
defFile(project.file("src/commonMain/cpp/ios/libmylib.def"))
packageName("libmylib")
}
}
}
binaries {
framework {
baseName = "shared"
embedBitcode("disable")
}
staticLib()
}
}
}
Kieren Searle
03/07/2023, 4:29 PMpackage = libmylib
compilerOpts = -Ipath/to/headers/
headers = my_header.h
staticLibraries = mylib.a
libraryPaths = path/to.lib/
Kieren Searle
03/07/2023, 4:35 PMKieren Searle
03/07/2023, 5:24 PM> Task :compileKotlinIosSimulatorArm64 UP-TO-DATE
Looks like it thinks everything is built for some reasonKieren Searle
03/07/2023, 6:40 PMtasks.withType<org.jetbrains.kotlin.gradle.tasks.CInteropProcess> {
outputs.upToDateWhen { false }
}
Kieren Searle
03/07/2023, 11:56 PMlistOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach { target ->
target.apply {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.CInteropProcess> {
outputs.upToDateWhen {
// Check if the klib file exists for this build.
// If it is then assume it's up to date.
file(
"build/classes/kotlin/${target.name}/main/cinterop/${this.outputFileName}"
).exists()
}
}
}
}