https://github.com/meituan-dianping/walle
适合仅仅使用简单功能的开发者,节省开发时间。?? 内容技术含量低勿喷。
按照步棸来:
1:
在位于项目的根目录 build.gradle
文件中添加walle gradle插件的依赖, 如下:
buildscript {
dependencies {
classpath 'com.meituan.android.walle:plugin:1.1.7'
}
}
2:
并在当前app的 build.gradle
文件中apply这个插件,并添加上用于读取渠道号的aar
apply plugin: 'walle'
dependencies {
compile 'com.meituan.android.walle:library:1.1.7'
}
3:
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")
}
4:
//签名 引用位置
signingconfigs {
config {
storefile file("d:/temp/jks/walle.jks")
storepassword "123456"
keyalias "xxx"
keypassword "123456"
// v2signingenabled true //禁用v2签名
}
//调用签名设置
buildtypes {
release {
minifyenabled false
proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro'
signingconfig signingconfigs.config
}
debug {
minifyenabled false
proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro'
signingconfig signingconfigs.config
}
}
5:添加
6:最后在
渠道包默认生成在build>outputs>channels中
build successful in 7s??? 表示成功了,用时7秒,walle比原始的方式快多了,使用walle的个个都是人才,说话又好听,我这辈子都不可能在使用原始方式。
?
?