mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-23 00:00:09 +08:00
feat: Build app bundles (.aab files) (#764)
* (android) Added android bundle support with some corrected tests added bundle specific output * with --packageType flag to have consistency with cordova-ios * warn about missing required signing params only if at least one signing param is present * produce error on run if packageType = bundle * added comments relating to shelljs as suggested * unit test case added by @brodybits - Chris Brody * Filled in error message and unit test spec Primary author: @breautek - Norman Breau <norman@normanbreau.com> Co-authored-by: Norman Breau <norman@normanbreau.com> Co-authored-by: Chris Brody <chris@brody.consulting>
This commit is contained in:
committed by
Chris Brody
parent
b3b8690bbd
commit
bd1697dbd2
@@ -66,6 +66,34 @@ describe('ProjectBuilder', () => {
|
||||
expect(args[0]).toBe('cdvBuildDebug');
|
||||
});
|
||||
|
||||
it('should set apk release', () => {
|
||||
const args = builder.getArgs('release', {
|
||||
packageType: 'apk'
|
||||
});
|
||||
expect(args[0]).withContext(args).toBe('cdvBuildRelease');
|
||||
});
|
||||
|
||||
it('should set apk debug', () => {
|
||||
const args = builder.getArgs('debug', {
|
||||
packageType: 'apk'
|
||||
});
|
||||
expect(args[0]).withContext(args).toBe('cdvBuildDebug');
|
||||
});
|
||||
|
||||
it('should set bundle release', () => {
|
||||
const args = builder.getArgs('release', {
|
||||
packageType: 'bundle'
|
||||
});
|
||||
expect(args[0]).withContext(args).toBe(':app:bundleRelease');
|
||||
});
|
||||
|
||||
it('should set bundle debug', () => {
|
||||
const args = builder.getArgs('debug', {
|
||||
packageType: 'bundle'
|
||||
});
|
||||
expect(args[0]).withContext(args).toBe(':app:bundleDebug');
|
||||
});
|
||||
|
||||
it('should add architecture if it is passed', () => {
|
||||
const arch = 'unittest';
|
||||
const args = builder.getArgs('debug', { arch });
|
||||
|
||||
Reference in New Issue
Block a user