abiFilters is set in android build.gradle defaultConfig block.
I'd like to exclude x86 from release buildType, but can't find an easy way to do it
Here is the build.gradle:
defaultConfig {
ndk {
abiFilters "armeabi", "x86"
moduleName "cipher_v1"
cFlags "-DRELEASE=1"
if (rootProject.ext.has("testCrack")) {
cFlags += " -DTEST_CRACK"
}
if (project.ext.has("authKey") && project.ext.has("androidId")) {
cFlags += "-DAUTH_KEY=\\\"" + project.ext.authKey + "\\\""
"-DANDROID_ID=\\\"" + project.ext.androidId + "\\\""
}
}
}
buildTypes {
release {
ndk {
abiFilters "armeabi"
}
}
}
Here is what I get:
unzip -l base-release.aar|grep cipher
17752 02-01-1980 00:00 jni/armeabi/libcipher_v1.so
17640 02-01-1980 00:00 jni/x86/libcipher_v1.so
Here is what I really want:
unzip -l base-release.aar|grep cipher
17752 02-01-1980 00:00 jni/armeabi/libcipher_v1.so
I'd like to keep a full abiFilters in the defautlConfig block
And specify ones in certain buildType
EDIT 1:
Yes, removing the defaultConfig and setting abiFilters in both debug & release block would work. But my question is how to utilize the defaultConfig