Native plugin library dependency resolution glitch

hello gradle forum.

We switched our c build from a custom build to gradle and are quite pleased with the current state.

One thing that keeps hitting us is that our build will non-deterministically fail with a linker error that complains about a library not being available. That library is build by our build and the depedency is defined in the NativeExecutableSpec.

Any help or suggestions about what might be wrong appreciated.