I am trying to add .so
files by wildcard search to my android library project.
In my library structure I have 2 sub-projects with build.gradle
files called primary
and testapp
. The project primary
generates some libraries in the form testLib_*.so
. In my testapp
I am trying to grab all these libraries and include them. I currently got this working by utilizing sourceSets
as follows;
sourceSets {
main {
jniLibs {
srcDirs += "../primary/build/intermediates/cmake/debug/obj/"
}
}
}
Such that this path contains target folders (i.e. arm64-v8a
, etc.) which then holds the required test libs.
However my problem with this approach is that I prefer to have simply a wildcard search which can pickup the required files. I want to avoid having these long paths which may change with time and also want to avoid including all libraries and instead only the ones that match my search. For example I would like to have something like the following;
sourceSets {
main {
jniLibs {
srcDirs += "../primary/**/testLib_*.so"
}
}
}
However all my wildcard searches have come up empty handed and simply do not end up including any files.