Gradle how to add native dependency? [Libgdx]
The Gradle Natives plugin should do what you want.You can specify a configuration that points at jar files that contain native dll/so. A gradle task "unpackNatives" will then unpack the dll/so into the build dirs.
Depending upon how you launch your application, you may still need to tell the Java runtime where to find the dll/so. There is some info about how this works at the project website:
You can add a flat directory as a repository in this way, as mentioned in the dependency-management section in the Gradle User Guide.
repositories { flatDir { dirs '../local_lib' }}
If you want to create your own dependency-configuration natives
, create it like this (more info on the same page):
configurations { natives}
Hope that helps.