渠道包打包神器 Walle(瓦力)

码农软件 · 软件分类 · 手机开发工具 · 2019-04-30 08:28:16

软件介绍

Walle(瓦力):Android Signature V2 Scheme 签名下的新一代渠道包打包神器

瓦力通过在 Apk 中的 APK Signature Block区块添加自定义的渠道信息来生成渠道包,从而提高了渠道包生成效率,可以作为单机工具来使用,也可以部署在 HTTP 服务器上来实时处理渠道包 Apk 的升级网络请求。

Quick Start

为了方便大家的使用,我们提供了2种使用方式:

  • Gradle 插件方式,方便快速集成

  • 命令行方式,最大化满足各种自定义需求

Gradle 插件使用方式

配置 build.gradle

在位于项目的根目录 build.gradle 文件中添加Walle Gradle插件的依赖, 如下:

buildscript {
    dependencies {
        classpath 'com.meituan.android.walle:plugin:1.0.3'
    }
}

并在当前App的 build.gradle 文件中apply这个插件,并添加上用于读取渠道号的AAR

apply plugin: 'walle'dependencies {
    compile 'com.meituan.android.walle:library:1.0.3'}

如何获取渠道信息

在需要渠道等信息时可以通过下面代码进行获取

String channel = WalleChannelReader.getChannel(this.getApplicationContext());

如何生成渠道包

生成渠道包的方式是和assemble指令结合,可以通过传入参数决定是否生成渠道包,渠道包的生成目录存放在 build/outputs/apk/

下面是各类用法示例:

  • 生成单个渠道包 ./gradlew clean assembleRelease -PchannelList=meituan

  • 支持 productFlavors ./gradlew clean assembleMeituanRelease -PchannelList=meituan

  • 生成多个渠道包 ./gradlew clean assembleRelease -PchannelList=meituan,dianping

  • 通过渠道配置文件来生成渠道包 ./gradlew clean assembleRelease -PchannelFile=channel

渠道信息的配置文件支持配置相对路径,详见:配置文件示例,同时配置文件支持使用#号添加注释。

本文地址:https://codercto.com/soft/d/4694.html

Artificial Intelligence

Artificial Intelligence

Stuart Russell、Peter Norvig / Pearson / 2009-12-11 / USD 195.00

The long-anticipated revision of this #1 selling book offers the most comprehensive, state of the art introduction to the theory and practice of artificial intelligence for modern applications. Intell......一起来看看 《Artificial Intelligence》 这本书的介绍吧!

MD5 加密
MD5 加密

MD5 加密工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具