Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

输出的apk如何自定义文件名格式?比如{app}-{channel}-{version}.{ext} #3

Closed
czy1121 opened this issue Jan 11, 2017 · 3 comments

Comments

@czy1121
Copy link

czy1121 commented Jan 11, 2017

No description provided.

@GavinCT
Copy link
Member

GavinCT commented Jan 11, 2017

考虑到自定义需求各种各样,我们并没有在plugin里提供模版。plugin只针对简单场景
可以写个shell脚本利用walle-cli进行自定义
例如你提到这个需求,可以有两个方案:

  1. 利用plugin生成,然后写个shell把批量生成的apk改成你需要的名字。因为app和channel本身plugin都有,version对于一个版本来说也是固定的,很方便写出来。
  2. 直接利用cli。shell/python获取输入市场列表,针对apk使用cli单个打包的方式,加上你output指定上你输出的信息,然后for循环继续。

@achellies
Copy link
Member

android {
applicationVariants.all { variant ->
variant.outputs.each { output ->
output.outputFile = new File(
output.outputFile.parent,
output.outputFile.name.replace(".apk", "-${variant.versionName}.apk"))
}
}
}
可以配置{app}-{version}.apk,插件默认是在尾部加channel,这样配置后输出文件为 {app}-{version}-{channel}.apk

achellies pushed a commit that referenced this issue Jan 19, 2017
* commit 'a9b35de8d02418b61b4bf156a813a53cd3d52b24':
  refine code
  拆分出payload reader/writer两个jar库
@Ruijiao
Copy link

Ruijiao commented Feb 8, 2017

渠道名的命名规范怎么以渠道名命名?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants