mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-20 23:56:20 +08:00
Fixed the specification of the builders in the run command by getting build to check what was being passed from run
This commit is contained in:
parent
8391af2e8f
commit
304a899114
5
bin/templates/cordova/lib/build.js
vendored
5
bin/templates/cordova/lib/build.js
vendored
@ -58,6 +58,10 @@ function parseOpts(options, resolvedTarget, projectRoot) {
|
||||
if (options.argv.gradle || options.argv.studio)
|
||||
ret.buildMethod = options.argv.studio ? 'studio' : 'gradle';
|
||||
|
||||
//This comes from cordova/run
|
||||
if (options.studio) ret.buildMethod = 'studio';
|
||||
if (options.gradle) ret.buildMethod = 'gradle';
|
||||
|
||||
if (options.nobuild) ret.buildMethod = 'none';
|
||||
|
||||
if (options.argv.versionCode)
|
||||
@ -148,6 +152,7 @@ module.exports.runClean = function(options) {
|
||||
*/
|
||||
module.exports.run = function(options, optResolvedTarget) {
|
||||
var opts = parseOpts(options, optResolvedTarget, this.root);
|
||||
console.log(opts.buildMethod);
|
||||
var builder = builders.getBuilder(opts.buildMethod);
|
||||
return builder.prepEnv(opts)
|
||||
.then(function() {
|
||||
|
Loading…
Reference in New Issue
Block a user