Android: Build separate APKs for each native platform.

This commit is contained in:
Eder Bastos
2015-05-13 22:45:12 -04:00
parent 42cc48f929
commit 4710c3e0eb
6 changed files with 48 additions and 1 deletions

View File

@ -29,6 +29,7 @@ android {
}
}
// Define build types, which are orthogonal to product flavors.
buildTypes {
// Signed by release key, allowing for upload to Play Store.
release {
@ -43,6 +44,35 @@ android {
jniDebuggable true
}
}
// Define product flavors, which can be split into categories. Common examples
// of product flavors are paid vs. free, ARM vs. x86, etc.
productFlavors {
arm {
// This flavor is mutually exclusive against any flavor in the same dimension.
flavorDimension "abi"
// When building this flavor, only include native libs from the specified folder.
ndk {
abiFilter "armeabi-v7a"
}
}
arm_64 {
flavorDimension "abi"
ndk {
abiFilter "arm64-v8a"
}
}
// TODO Uncomment this when we successfully build for x86_64.
/*x86_64 {
flavorDimension "abi"
ndk {
abiFilter "x86_64"
}
}*/
}
}
dependencies {