How to specify a package time dependency for cpp-application plugin

We are using the new native “cpp-application” and “cpp-library” plugins. In my build script I need to have a dependency when packaging into an RPM. The dependency is a “native” C++ shared library that is not used at compile/link time of the application but must be present at runtime when the application is deployed.

I am at a loss as to how to define this dependency in by build.gradle script. Note that the dependency will be hosted on a maven compatible repository.

Any help will be greatly appreciated.

Please include the ‘native’ tag for the post.

As for your question, here’s a suggested workaround https://github.com/gradle/gradle-native/issues/831
This particularly straight forward but possible.

Will do with adding the “native” tag. Thanks for the tip on that and also thanks for pointing me at the workaround! Much appreciated.