mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 15:12:51 +08:00
CB-3445: Add environment variable 'BUILD_MULTIPLE_APKS' for splitting APKs based on architecture
This commit is contained in:
parent
233e513860
commit
623b2306ca
26
bin/templates/cordova/lib/build.js
vendored
26
bin/templates/cordova/lib/build.js
vendored
@ -156,13 +156,25 @@ var builders = {
|
||||
},
|
||||
gradle: {
|
||||
getArgs: function(cmd) {
|
||||
var lintSteps = [
|
||||
'lint',
|
||||
'lintVitalRelease',
|
||||
'compileLint',
|
||||
'copyReleaseLint',
|
||||
'copyDebugLint'
|
||||
];
|
||||
var lintSteps;
|
||||
if (process.env['BUILD_MULTIPLE_APKS']) {
|
||||
lintSteps = [
|
||||
'lint',
|
||||
'lintVitalX86Release',
|
||||
'lintVitalArmv7Release',
|
||||
'compileLint',
|
||||
'copyReleaseLint',
|
||||
'copyDebugLint'
|
||||
];
|
||||
} else {
|
||||
lintSteps = [
|
||||
'lint',
|
||||
'lintVitalRelease',
|
||||
'compileLint',
|
||||
'copyReleaseLint',
|
||||
'copyDebugLint'
|
||||
];
|
||||
}
|
||||
var args = [cmd, '-b', path.join(ROOT, 'build.gradle')];
|
||||
// 10 seconds -> 6 seconds
|
||||
args.push('-Dorg.gradle.daemon=true');
|
||||
|
@ -41,7 +41,7 @@ android {
|
||||
compileSdkVersion 19
|
||||
buildToolsVersion "19.0.0"
|
||||
|
||||
if (multiarch) {
|
||||
if (multiarch || System.env.BUILD_MULTIPLE_APKS) {
|
||||
productFlavors {
|
||||
armv7 {
|
||||
versionCode defaultConfig.versionCode + 2
|
||||
|
Loading…
Reference in New Issue
Block a user