You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ni...@apache.org on 2015/07/22 20:37:39 UTC

[1/4] android commit: CB-9185 Fixed an issue when unsigned apks couldn't be found. This closes #202

Repository: cordova-android
Updated Branches:
  refs/heads/4.1.x 4a7cbb5eb -> 20d2964be


CB-9185 Fixed an issue when unsigned apks couldn't be found. This closes #202

(cherry picked from commit 8983ddbdccb60a680baa734e81b7817d1d4278a4)


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

Branch: refs/heads/4.1.x
Commit: d40f43c144ef9ec08e5feafc15ef78bc5b24f5f5
Parents: 5fb913d
Author: alsorokin <al...@akvelon.com>
Authored: Wed Jul 22 18:39:35 2015 +0300
Committer: Nikhil Khandelwal <ni...@microsoft.com>
Committed: Wed Jul 22 11:33:29 2015 -0700

----------------------------------------------------------------------
 bin/templates/cordova/lib/build.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/d40f43c1/bin/templates/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/lib/build.js b/bin/templates/cordova/lib/build.js
index cd07a59..aa9f3d0 100644
--- a/bin/templates/cordova/lib/build.js
+++ b/bin/templates/cordova/lib/build.js
@@ -74,7 +74,7 @@ function findOutputApksHelper(dir, build_type, arch) {
             return /-debug/.exec(candidate) && !/-unaligned|-unsigned/.exec(candidate);
         }
         if (build_type === 'release') {
-            return /-release/.exec(candidate) && !/-unaligned|-unsigned/.exec(candidate);
+            return /-release/.exec(candidate) && !/-unaligned/.exec(candidate);
         }
         return true;
     });
@@ -82,7 +82,7 @@ function findOutputApksHelper(dir, build_type, arch) {
     if (ret.length === 0) {
         return ret;
     }
-    // Assume arch-specific build if newest api has -x86 or -arm.
+    // Assume arch-specific build if newest apk has -x86 or -arm.
     var archSpecific = !!/-x86|-arm/.exec(ret[0]);
     // And show only arch-specific ones (or non-arch-specific)
     ret = ret.filter(function(p) {
@@ -90,11 +90,12 @@ function findOutputApksHelper(dir, build_type, arch) {
         return !!/-x86|-arm/.exec(p) == archSpecific;
         /*jshint +W018 */
     });
-    if (arch && ret.length > 1) {
+    if (archSpecific && ret.length > 1) {
         ret = ret.filter(function(p) {
             return p.indexOf('-' + arch) != -1;
         });
     }
+
     return ret;
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[3/4] android commit: CB-9389 Fixes build/check_reqs hang

Posted by ni...@apache.org.
CB-9389 Fixes build/check_reqs hang

This removes gradle version check since it requires downloading and
installing of gradle distributive if it is not installed yet.

Partial revert of 4bf705a

(cherry picked from commit f9ce1c607befb7e5ce6e9ea98a1dd93b752ef297)


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

Branch: refs/heads/4.1.x
Commit: 5fa4728ebe4a54e03d85821d712a6388f9196130
Parents: 4a7cbb5
Author: Vladimir Kotikov <v-...@microsoft.com>
Authored: Wed Jul 22 13:20:39 2015 +0300
Committer: Nikhil Khandelwal <ni...@microsoft.com>
Committed: Wed Jul 22 11:33:29 2015 -0700

----------------------------------------------------------------------
 bin/lib/check_reqs.js | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/5fa4728e/bin/lib/check_reqs.js
----------------------------------------------------------------------
diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js
index d11a0d2..0b31a2a 100644
--- a/bin/lib/check_reqs.js
+++ b/bin/lib/check_reqs.js
@@ -82,15 +82,12 @@ module.exports.check_ant = function() {
 // Returns a promise. Called only by build and clean commands.
 module.exports.check_gradle = function() {
     var sdkDir = process.env['ANDROID_HOME'];
-    var message = 'Could not find gradle wrapper within Android SDK. ';
-    if (!sdkDir) return Q.reject(message + 'Might need to install Android SDK or set up \'ADROID_HOME\' env variable.');
-    var wrapper = path.join(sdkDir, 'tools', 'templates', 'gradle', 'wrapper', 'gradlew');
-    return tryCommand('"' + wrapper + '" -v', message + 'Might need to update your Android SDK.\n' +
-            'Looked here: ' + path.dirname(wrapper))
-    .then(function (output) {
-        // Parse Gradle version from command output
-        return/^gradle ((?:\d+\.)+(?:\d+))/gim.exec(output)[1];
-    });
+    var wrapperDir = path.join(sdkDir, 'tools', 'templates', 'gradle', 'wrapper');
+    if (!fs.existsSync(wrapperDir)) {
+        return Q.reject(new Error('Could not find gradle wrapper within android sdk. Might need to update your Android SDK.\n' +
+            'Looked here: ' + wrapperDir));
+    }
+    return Q.when();
 };
 
 // Returns a promise.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[4/4] android commit: Updating RELEASENOTES

Posted by ni...@apache.org.
Updating RELEASENOTES


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

Branch: refs/heads/4.1.x
Commit: 20d2964be783ff9c152e085ded0f443d38b70652
Parents: d40f43c
Author: Nikhil Khandelwal <ni...@microsoft.com>
Authored: Wed Jul 22 11:37:00 2015 -0700
Committer: Nikhil Khandelwal <ni...@microsoft.com>
Committed: Wed Jul 22 11:37:00 2015 -0700

----------------------------------------------------------------------
 RELEASENOTES.md | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/20d2964b/RELEASENOTES.md
----------------------------------------------------------------------
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 41ec1c1..1b6a7c2 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -22,6 +22,10 @@
 Update these notes using: git log --pretty=format:'* %s' --topo-order --no-merges *remote*/4.1.x...HEAD
 
 ### Release 4.1.0 (Jul 2015) ###
+
+* CB-9185 Fixed an issue when unsigned apks couldn't be found. This closes #202
+* CB-9397 Fixes minor issues with `cordova requirements android`
+* CB-9389 Fixes build/check_reqs hang
 * CB-9392 Fixed printing flavored versions. This closes #184.
 * CB-9382 [Android] Fix KeepRunning setting when Plugin activity is showed. This closes #200
 * CB-9391 Fixes cdvBuildMultipleApks option casting


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[2/4] android commit: CB-9397 Fixes minor issues with `cordova requirements android`

Posted by ni...@apache.org.
CB-9397 Fixes minor issues with `cordova requirements android`

(cherry picked from commit d99a21eb8debecb9e247c60365a28632a365efb6)


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

Branch: refs/heads/4.1.x
Commit: 5fb913d00088a9df8ea0816c523a6558d271dd25
Parents: 5fa4728
Author: Vladimir Kotikov <v-...@microsoft.com>
Authored: Wed Jul 22 16:45:49 2015 +0300
Committer: Nikhil Khandelwal <ni...@microsoft.com>
Committed: Wed Jul 22 11:33:29 2015 -0700

----------------------------------------------------------------------
 bin/lib/check_reqs.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/5fb913d0/bin/lib/check_reqs.js
----------------------------------------------------------------------
diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js
index 0b31a2a..ffa35b6 100644
--- a/bin/lib/check_reqs.js
+++ b/bin/lib/check_reqs.js
@@ -82,9 +82,13 @@ module.exports.check_ant = function() {
 // Returns a promise. Called only by build and clean commands.
 module.exports.check_gradle = function() {
     var sdkDir = process.env['ANDROID_HOME'];
+    if (!sdkDir)
+        return Q.reject('Could not find gradle wrapper within Android SDK. Could not find Android SDK directory.\n' +
+            'Might need to install Android SDK or set up \'ANDROID_HOME\' env variable.');
+
     var wrapperDir = path.join(sdkDir, 'tools', 'templates', 'gradle', 'wrapper');
     if (!fs.existsSync(wrapperDir)) {
-        return Q.reject(new Error('Could not find gradle wrapper within android sdk. Might need to update your Android SDK.\n' +
+        return Q.reject(new Error('Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.\n' +
             'Looked here: ' + wrapperDir));
     }
     return Q.when();
@@ -312,7 +316,7 @@ module.exports.check_all = function() {
             requirement.installed = true;
             requirement.metadata.version = version;
         }, function (err) {
-            requirement.metadata.reason = err;
+            requirement.metadata.reason = err instanceof Error ? err.message : err;
         });
     }, Q())
     .then(function () {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org