android: build.gradle - added build flavor "fail-test" to test System.loadLibrary("mpd") failure
This commit is contained in:
@@ -44,6 +44,26 @@ android {
|
|||||||
// flavors
|
// flavors
|
||||||
flavorDimensions += "base"
|
flavorDimensions += "base"
|
||||||
productFlavors {
|
productFlavors {
|
||||||
|
create("fail-test") {
|
||||||
|
// To test System.loadLibrary("mpd") failure
|
||||||
|
// exclude the native lib from the package
|
||||||
|
packaging {
|
||||||
|
jniLibs {
|
||||||
|
// it appears the 'excludes' is applied to all flavors
|
||||||
|
// even if it's only inside this flavor.
|
||||||
|
// this filters by task name to apply the exclusion only
|
||||||
|
// for this flavor name.
|
||||||
|
// (clearing the 'abiFilters' will only create a universal apk
|
||||||
|
// with all of the abi versions)
|
||||||
|
gradle.startParameter.getTaskNames().forEach { task ->
|
||||||
|
if (task.contains("fail-test", ignoreCase = true)) {
|
||||||
|
println("NOTICE: excluding libmpd.so from package $task for testing")
|
||||||
|
excludes += "**/libmpd.so"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
create("arm64-v8a") {
|
create("arm64-v8a") {
|
||||||
ndk {
|
ndk {
|
||||||
// ABI to include in package
|
// ABI to include in package
|
||||||
|
Reference in New Issue
Block a user