You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ia...@apache.org on 2014/08/28 22:18:34 UTC

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

Repository: cordova-android
Updated Branches:
  refs/heads/master 7a0918244 -> 34dde5350


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


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/34dde535
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/34dde535
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/34dde535

Branch: refs/heads/master
Commit: 34dde535068579b762dcda89ba92f8ab8adf8a97
Parents: 7a09182
Author: Ian Clelland <ic...@chromium.org>
Authored: Thu Aug 28 16:17:54 2014 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Thu Aug 28 16:18:02 2014 -0400

----------------------------------------------------------------------
 bin/templates/cordova/lib/build.js | 26 +++++++++++++++++++-------
 bin/templates/project/build.gradle |  2 +-
 2 files changed, 20 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/34dde535/bin/templates/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/lib/build.js b/bin/templates/cordova/lib/build.js
index 1f4810d..77fe259 100644
--- a/bin/templates/cordova/lib/build.js
+++ b/bin/templates/cordova/lib/build.js
@@ -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');

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/34dde535/bin/templates/project/build.gradle
----------------------------------------------------------------------
diff --git a/bin/templates/project/build.gradle b/bin/templates/project/build.gradle
index 8bccc41..9d1d45a 100644
--- a/bin/templates/project/build.gradle
+++ b/bin/templates/project/build.gradle
@@ -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