cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [16/45] android commit: CB-9389 Fixes build/check_reqs hang
Date Wed, 23 Sep 2015 19:58:27 GMT
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


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

Branch: refs/heads/5.0.x
Commit: 082e299003a3c03b0e750e6b6b636a534cab31b0
Parents: 67ba021
Author: Vladimir Kotikov <v-vlkoti@microsoft.com>
Authored: Wed Jul 22 13:20:39 2015 +0300
Committer: Joe Bowser <bowserj@apache.org>
Committed: Thu Aug 20 13:48:03 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/082e2990/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


Mime
View raw message