[android] add sign task

This commit is contained in:
2019-10-08 17:35:30 +03:00
parent 7fa0174a7b
commit cc2c4f19f8
5 changed files with 48 additions and 10 deletions

View File

@@ -103,8 +103,7 @@ class HaxeBuilder extends Builder {
'tools',
'platform-tools',
'build-tools;27.0.3',
//'platforms;android-19',
'platforms;android-26',
'platforms;android-28',
//'ndk-bundle',
'lldb;3.1',
'cmake;3.6.4111459',
@@ -125,7 +124,12 @@ class HaxeBuilder extends Builder {
switch (this.buildSystem) {
case BuildSystem.OPENFL:
return this.haxe.openfl('build', this.platform, this.config, this.debug)
.then(result => streamToPromise(result.pipe(vfs.dest(target))));
.then(result => {
if (this.platform === Platform.ANDROID && this.config.key) {
result = result.pipe(this.android.sign(this.config.key.store, this.config.key.pass));
}
return streamToPromise(result.pipe(vfs.dest(target)));
});
case BuildSystem.HAXE:
return this.haxe.build(this.platform, this.config, this.debug)
.then(result => streamToPromise(result.pipe(vfs.dest(target))));