mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-23 00:00:09 +08:00
CB-3445 Copy gradle wrapper in build instead of create
This should play nicer with updates to the android SDK.
This commit is contained in:
@@ -64,23 +64,6 @@ module.exports.get_target = function() {
|
||||
}
|
||||
}
|
||||
|
||||
// Returns a promise.
|
||||
module.exports.sdk_dir = function() {
|
||||
var d = Q.defer();
|
||||
which('android', function(err, path) {
|
||||
if (err) {
|
||||
d.reject(new Error('ERROR: Cannot find Android SDK. android command not found.'));
|
||||
} else {
|
||||
var toolsDir = path.substring(0, path.lastIndexOf('/'));
|
||||
if (toolsDir.substring(toolsDir.length-6) != "/tools") {
|
||||
d.reject(new Error('ERROR: Cannot find Android SDK. android command not found in tools dir.'));
|
||||
}
|
||||
d.resolve(toolsDir.substring(0, toolsDir.length-6));
|
||||
}
|
||||
});
|
||||
return d.promise;
|
||||
};
|
||||
|
||||
// Returns a promise. Called only by build and clean commands.
|
||||
module.exports.check_ant = function() {
|
||||
return tryCommand('ant -version', 'Failed to run "ant -version", make sure you have ant installed and added to your PATH.');
|
||||
|
||||
Reference in New Issue
Block a user