I want to do some processing of the generated bind...
# kotlin-native
a
I want to do some processing of the generated bindings, packaged into a .klib, that Kotlin Native generates for a header file, but there’s been a change between Kotlin 1.8 and 1.9. In 1.8 I could get the .klib from the CInteropProcess task:
Copy code
val klibFile: Provider<File> = tasks
  .withType<CInteropProcess>()
  .named("cinteropRocksdbLinuxX64")
  .flatMap { it.outputFileProvider }
But after updating to 1.9 this file is empty, and I can’t see any .klib file in the build directory. Is there another Gradle task that outputs the .klib? I can see the .klib files are generated into
$projectRoot/.gradle/kotlin/kotlinCInteropLibraries
, but I can’t see how to get these via a Gradle task
I’ve got it working now. I think the klib wasn’t generated because
headerFilter = *
was in the .def file. But my project is very messy so I’m not sure!