building android client modules abi based on if the native modules exists in jniLibs

This commit is contained in:
Ely Ronnen 2022-03-28 19:02:36 +03:00 committed by akallabeth
parent be07eb6f35
commit 29fcfdce03
1 changed files with 16 additions and 0 deletions

View File

@ -25,6 +25,22 @@ android {
minSdkVersion rootProject.ext.minApi
targetSdkVersion rootProject.ext.targetApi
vectorDrawables.useSupportLibrary = true
ndk {
File jniLibsDirectory = new File(project.projectDir, "src/main/jniLibs")
ArrayList<String> abiFiltersList = new ArrayList<String>();
if (new File(jniLibsDirectory, "arm64-v8a/libfreerdp3.so").exists())
abiFiltersList.add("arm64-v8a")
if (new File(jniLibsDirectory, "armeabi-v7a/libfreerdp3.so").exists())
abiFiltersList.add("armeabi-v7a")
if (new File(jniLibsDirectory, "x86_64/libfreerdp3.so").exists())
abiFiltersList.add("x86_64")
if (new File(jniLibsDirectory, "x86/libfreerdp3.so").exists())
abiFiltersList.add("x86")
abiFilters = abiFiltersList
}
externalNativeBuild {
cmake {
arguments "-DWITH_CLIENT_CHANNELS=ON"