Skip to content

Commit

Permalink
fix: for module build enable target & device-id command line paramete…
Browse files Browse the repository at this point in the history
…rs for the example app (#13432)

Co-authored-by: Chris Barber <chris@cb1inc.com>
Co-authored-by: Sebastian Klaus <sebastian@lightapps.de>
  • Loading branch information
3 people committed May 17, 2022
1 parent 6566453 commit e915ef6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion android/cli/commands/_buildModule.js
Expand Up @@ -194,6 +194,8 @@ AndroidModuleBuilder.prototype.validate = function validate(logger, config, cli)
return function (finished) {
this.projectDir = cli.argv['project-dir'];
this.buildOnly = cli.argv['build-only'];
this.target = cli.argv['target'];
this.deviceId = cli.argv['device-id'];

this.cli = cli;
this.logger = logger;
Expand Down Expand Up @@ -889,7 +891,15 @@ AndroidModuleBuilder.prototype.runModule = async function (cli) {

// Run the temp app.
this.logger.debug(__('Running example project...', tmpDir.cyan));
const buildArgs = [ process.argv[1], 'build', '-p', 'android', '-d', tmpProjectDir ];
let buildArgs = [ process.argv[1], 'build', '-p', 'android', '-d', tmpProjectDir ];
if (this.target) {
buildArgs.push('-T');
buildArgs.push(this.target);
}
if (this.deviceId) {
buildArgs.push('-C');
buildArgs.push(this.deviceId);
}
await runTiCommand(process.execPath, buildArgs, this.logger);
};

Expand Down

0 comments on commit e915ef6

Please sign in to comment.