CB-3445: Add environment variable 'BUILD_MULTIPLE_APKS' for splitting APKs based on architecture

This commit is contained in:
Ian Clelland 2014-08-28 16:17:54 -04:00
parent 233e513860
commit 623b2306ca
2 changed files with 20 additions and 8 deletions

View File

@ -156,13 +156,25 @@ var builders = {
}, },
gradle: { gradle: {
getArgs: function(cmd) { getArgs: function(cmd) {
var lintSteps = [ var lintSteps;
'lint', if (process.env['BUILD_MULTIPLE_APKS']) {
'lintVitalRelease', lintSteps = [
'compileLint', 'lint',
'copyReleaseLint', 'lintVitalX86Release',
'copyDebugLint' 'lintVitalArmv7Release',
]; 'compileLint',
'copyReleaseLint',
'copyDebugLint'
];
} else {
lintSteps = [
'lint',
'lintVitalRelease',
'compileLint',
'copyReleaseLint',
'copyDebugLint'
];
}
var args = [cmd, '-b', path.join(ROOT, 'build.gradle')]; var args = [cmd, '-b', path.join(ROOT, 'build.gradle')];
// 10 seconds -> 6 seconds // 10 seconds -> 6 seconds
args.push('-Dorg.gradle.daemon=true'); args.push('-Dorg.gradle.daemon=true');

View File

@ -41,7 +41,7 @@ android {
compileSdkVersion 19 compileSdkVersion 19
buildToolsVersion "19.0.0" buildToolsVersion "19.0.0"
if (multiarch) { if (multiarch || System.env.BUILD_MULTIPLE_APKS) {
productFlavors { productFlavors {
armv7 { armv7 {
versionCode defaultConfig.versionCode + 2 versionCode defaultConfig.versionCode + 2