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

packer.archiveNameFormat doesn't work? #8

Closed
ghost opened this issue Dec 7, 2015 · 1 comment
Closed

packer.archiveNameFormat doesn't work? #8

ghost opened this issue Dec 7, 2015 · 1 comment

Comments

@ghost
Copy link

ghost commented Dec 7, 2015

我发现我配好packer的archiveNameFormat但是不起效果

这是我的gradle脚本的头部
apply plugin: 'com.android.application'
apply plugin: 'packer'
def dest='.'

packer {
// 指定渠道打包输出目录
//archiveOutput = file(new File(project.rootProject.buildDir.path, "apks"))
// 指定渠道打包输出文件名格式
archiveNameFormat = '${appName}${versionName}${flavorName}_${buildTime}'
// 指定渠道打包需要修改的AndroidManifest文件项
manifestMatcher = ['UMENG_CHANNEL','CHANNEL']
// 指定是否使用build版本号自增
//buildNumberAuto = true
// 指定使用版本号自增的buildType,默认是全部
//buildNumberTypeMatcher = ['release']

}

这是输出的apk目录
-rw-rw-r-- 1 renhui renhui 17882958 12月 7 16:52 Uplus-shuomingshu-release.apk
-rw-rw-r-- 1 renhui renhui 17881193 12月 7 16:52 Uplus-shuomingshu-release-unaligned.apk
-rw-rw-r-- 1 renhui renhui 17882967 12月 7 16:53 Uplus-xmedia-release.apk
-rw-rw-r-- 1 renhui renhui 17881204 12月 7 16:53 Uplus-xmedia-release-unaligned.apk

这文件名到底谁控制的?

@mcxiaoke mcxiaoke closed this as completed Jan 1, 2016
@mcxiaoke mcxiaoke reopened this Jan 1, 2016
@mcxiaoke
Copy link
Owner

mcxiaoke commented Jan 5, 2016

archiveNameFormat = 'myapp-${appPkg}-${flavorName}-${buildType}-v${versionName}'
 ./gradlew -Pmarket=markets.txt clean archiveApkRelease
myapp-com.mcxiaoke.next-Google_Play-release-v1.0.0.apk
myapp-com.mcxiaoke.next-Gradle_Test-release-v1.0.0.apk
myapp-com.mcxiaoke.next-SomeMarket-release-v1.0.0.apk

我测试没问题

@mcxiaoke mcxiaoke closed this as completed Jan 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant