mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
fix: GH-873 App bundle builds to obey command-line arguments (#941)
This commit is contained in:
parent
6e51943d15
commit
c93f93f637
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user