Cinterop using cpp-library in gradle

I am developing a multiproject in gradle using monorepo.
Several projects are Kotlin/Multiplatform, another project is cpp-library. I want to pull my cpp-library artifacts into one of the Kotlin/Multiplatform projects using cinterop.

Is it possible to have a C library in a separate gradle subproject and then access it via cinterop for the nativeMain implementation?

Best regards Kristoffer

1 Like

Solved the problem, see reference implementation GitHub - kristoffer-paulsson/kotlin-monorepo-gradle-multiproject-jni-cinterop: Example of C interop and JNI side by side in a mono repo multi project setup with Kotlin/Multiplatform.