mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-20 23:56:20 +08:00
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
This commit is contained in:
parent
847312fcf9
commit
f9ce1c607b
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user