Skip to content

Commit

Permalink
[TIMOB-25353] Attempt to include missing module dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Gary Mathews committed Nov 7, 2017
1 parent e5f385f commit d876555
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion android/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,7 @@ AndroidBuilder.prototype.validate = function validate(logger, config, cli) {
}

return function (callback) {
this.validateTiModules('android', this.deployType, function (err, modules) {
this.validateTiModules('android', this.deployType, function validateTiModulesCallback(err, modules) {
this.modules = modules.found;

this.commonJsModules = [];
Expand Down Expand Up @@ -1640,13 +1640,23 @@ process.exit(1);
}
if (missing) {
dependency.depended = module;

// attempt to include missing dependency
this.cli.tiapp.modules.push({
id: dependency.id,
version: dependency.version,
platform: ['android'],
deployType: [this.deployType]
});

unresolvedDependencies.push(dependency);
}
}
}
}
}
if (unresolvedDependencies.length) {
/*
let msg = 'could not find required module dependencies:';
for (let dependency of unresolvedDependencies) {
msg += __('\n id: %s version: %s platform: %s required by %s',
Expand All @@ -1657,6 +1667,10 @@ process.exit(1);
}
logger.error(msg);
process.exit(1);
*/

// re-validate modules
return this.validateTiModules('android', this.deployType, validateTiModulesCallback.bind(this));
}

// check if we have any conflicting jars
Expand Down

0 comments on commit d876555

Please sign in to comment.