I'm using Gradle to compile a C lib to include sta...
# gradle
a
I'm using Gradle to compile a C lib to include statically into Kotlin Native binaries. I've got multiple tasks depending on the K/N target, and whether it's a debug/release. How can I dynamically select the 'compile Kotlin Native $target ${debug/release}' tasks so I can dynamically set
-include-binary
into freeCompilerArgs? I tried doing it like this, but
binary.compilation.compileTaskProvider
returns the same task for both the debug/release binaries... The logs shows that the debug and release lib is added twice. This makes compilation SO slow for debug builds. And I'm getting run failures because symbols can't be found.
Copy code
> Task :kayray-modules:interop-raylib:compileKotlinMacosArm64
[:interop-raylib:compileKotlinMacosArm64] MacosArm64ReleaseStatic includeBinary args: [-include-binary, /my-project/build/libs/macosArm64/Release/libraylib.a]
[:interop-raylib:compileKotlinMacosArm64] MacosArm64DebugStatic includeBinary args: [-include-binary, /my-project/build/libs/macosArm64/Debug/libraylib.a]