[core] add config android extenions param
This commit is contained in:
@@ -47,6 +47,7 @@ class Config {
|
||||
fps: 60,
|
||||
};
|
||||
this.key = null;
|
||||
this.android = [];
|
||||
if (params) {
|
||||
this.update(params);
|
||||
this.afterUpdate();
|
||||
@@ -70,6 +71,7 @@ class Config {
|
||||
if (params.flags !== undefined) this.flags = this.flags.concat(params.flags);
|
||||
if (params.meta !== undefined) this.meta = {...this.meta, ...params.meta};
|
||||
if (params.key !== undefined) this.key = params.key;
|
||||
if (params.android !== undefined) this.android = this.android.concat(params.android.map(item => ({path: Config.absolutePath(item.path), extensions: item.extensions})));
|
||||
if (this.meta.icon) this.icon = Config.absolutePath(this.meta.icon);
|
||||
}
|
||||
|
||||
|
||||
@@ -450,7 +450,7 @@ class AndroidRunner extends Runner {
|
||||
|
||||
call() {
|
||||
const target = this.targetPath;
|
||||
return this.log(gulp.src(`${target}/${this.config.meta.filename}_*.apk`)
|
||||
return this.log(gulp.src(`${target}/${this.config.meta.filename}_${this.config.meta.version}.apk`)
|
||||
.pipe(this.android.apk())
|
||||
.pipe(this.android.install())
|
||||
.pipe(this.android.start())
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gulp-haxetool",
|
||||
"version": "0.1.3",
|
||||
"version": "0.1.4",
|
||||
"description": "HaXe Tool for Gulp",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
|
||||
@@ -23,4 +23,8 @@
|
||||
<haxeflag name="-D" value="swf-gpu"/>
|
||||
<haxeflag name="-D" value="native-trace"/>
|
||||
<haxeflag name="-dce" value="no"/>
|
||||
|
||||
<% android.forEach(function(item) { %>
|
||||
<dependency name="android" path="<%=item.path%>" if="android"/>
|
||||
<% item.extensions.forEach(function(extension) { %><android extension="<%=extension%>"/><% }); %><% }); %>
|
||||
</project>
|
||||
|
||||
Reference in New Issue
Block a user