fix: GH-873 App bundle builds to obey command-line arguments (#941)

This commit is contained in:
Norman Breau 2020-04-01 01:59:39 -03:00 committed by GitHub
parent 6e51943d15
commit c93f93f637
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 2 deletions

View File

@ -141,10 +141,10 @@ class ProjectBuilder {
if (opts.arch) {
args.push('-PcdvBuildArch=' + opts.arch);
}
args.push.apply(args, opts.extraArgs);
}
args.push.apply(args, opts.extraArgs);
return args;
}

View File

@ -113,6 +113,23 @@ describe('ProjectBuilder', () => {
});
expect(args[0]).toBe('clean');
});
describe('should accept extra arguments', () => {
it('apk', () => {
const args = builder.getArgs('debug', {
extraArgs: ['-PcdvVersionCode=12344']
});
expect(args).toContain('-PcdvVersionCode=12344');
});
it('bundle', () => {
const args = builder.getArgs('debug', {
packageType: 'bundle',
extraArgs: ['-PcdvVersionCode=12344']
});
expect(args).toContain('-PcdvVersionCode=12344');
});
});
});
describe('runGradleWrapper', () => {