mirror of
https://github.com/apache/cordova-android.git
synced 2026-05-30 00:00:04 +08:00
[CB-3542] Only update framework/ project when building the jar.
No need to do it during every check_reqs. This also extracts the jar building into a helper function.
This commit is contained in:
@@ -69,17 +69,10 @@ module.exports.check_android = function() {
|
||||
} else if(!targets.output.match(valid_target)) {
|
||||
console.error('Please install Android target ' + valid_target.split('-')[1] + ' (the Android newest SDK). Make sure you have the latest Android tools installed as well. Run \"android\" from your command-line to install/update any missing SDKs or tools.');
|
||||
return false;
|
||||
} else {
|
||||
var cmd = 'android update project -p ' + ROOT + ' -t ' + valid_target + ' 1> /dev/null 2>&1';
|
||||
var result = shell.exec(cmd, {silent:false, async:true});
|
||||
if(result.code > 0) {
|
||||
console.error('Error updating the Cordova library to work with your Android environment.');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
module.exports.run = function() {
|
||||
return this.check_ant() && this.check_java && this.check_android();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user