[android] added module

This commit is contained in:
2018-05-08 18:05:29 +03:00
parent 331d687f66
commit 4ed7fb3a02
4 changed files with 214 additions and 41 deletions

View File

@@ -92,7 +92,11 @@ class Haxe extends Sdk {
}
const target = path.resolve(buildDir, platform, 'bin');
fse.emptyDirSync(target);
return this.haxelib(args).then(() => vfs.src(`${target}/**/*`));
const result = {
'android': 'app/build/outputs/apk/*.apk',
'flash': '*.swf',
}[platform] || '**/*';
return this.haxelib(args).then(() => vfs.src(`${target}/${result}`));
}
build(platform, config, debug=false) {
@@ -121,7 +125,7 @@ class Haxe extends Sdk {
args.push('-debug');
}
const target = path.resolve(buildDir, platform, 'bin');
fse.emptyDirSync(target)
fse.emptyDirSync(target);
for (const asset of config.assets) {
fse.copySync(asset, path.join(target, asset.split(path.sep).pop()));
}