代码拉取完成,页面将自动刷新
###关于美团打包框架 walle的使用实践
https://github.com/Meituan-Dianping/walle //repo
https://github.com/Meituan-Dianping/walle/blob/master/walle-cli/README.md //cli
https://tech.meituan.com/android_apk_v2-signature_scheme.html
###useage 配置 gradle
buildscript {
dependencies {
classpath 'com.meituan.android.walle:plugin:1.1.6'
}
}
app gradle
apply plugin: 'walle'
dependencies {
compile 'com.meituan.android.walle:library:1.1.6'
}
//插件配置
walle {
// 指定渠道包的输出路径
apkOutputFolder = new File("${project.buildDir}/outputs/channels");
// 定制渠道包的APK的文件名称
apkFileNameFormat = '${appName}-${packageName}-${channel}-${buildType}-v${versionName}-${versionCode}-${buildTime}.apk';
// 渠道配置文件
channelFile = new File("${project.getProjectDir()}/channel")
}
生成
生成渠道包 ./gradlew clean assembleReleaseChannels
支持 productFlavors ./gradlew clean assembleMeituanReleaseChannels
再使用cli工具写入
java -jar walle-cli-all.jar put -c meituan -e buildtime=20161212,hash=xxxxxxx /Users/xxx/Downloads/app.apk
//应用内获取参数
String channel = WalleChannelReader.getChannel(this.getApplicationContext());
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。