mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-01 02:12:58 +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: {
|
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');
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user