Walle

Android Signature V2 Scheme签名下的新一代渠道包打包神器
Alternatives To Walle
Select To Compare


Readme

Walle

Release Version Build Status PRs Welcome License

WalleAndroid Signature V2 Scheme

ApkAPK Signature BlockHTTPApk

Quick Start

2

  • Gradle

Gradle

build.gradle

build.gradle Walle Gradle

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

App build.gradle applyAAR

apply plugin: 'walle'

dependencies {
    compile 'com.meituan.android.walle:library:1.1.7'
}

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")
}
  • apkOutputFolder new File("${project.buildDir}/outputs/apk")

  • apkFileNameFormatAPK, '${appName}-${buildType}-${channel}.apk'
    :

         projectName - 
         appName - App
         packageName - applicationId (ApppackageName)
         buildType - buildType (release/debug)
         channel - channel ()
         versionName - versionName ()
         versionCode - versionCode ()
         buildTime - buildTime ()
         fileSHA1 - fileSHA1 (APKSHA1)
         flavorName -  productFlavors 
    
  • channelFile #

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

assemble${variantName}Channels build/outputs/apk/``walle``apkOutputFolder

  • ./gradlew clean assembleReleaseChannels
  • productFlavors ./gradlew clean assembleMeituanReleaseChannels

channelFilewalleconfigFile

walle {
    // &channelFile
	configFile = new File("${project.getProjectDir()}/config.json")
}

configFile
jsonchannel&

  • channelFile``configFile
  • extraInfo channelkey
ChannelInfo channelInfo= WalleChannelReader.getChannelInfo(this.getApplicationContext());
if (channelInfo != null) {
   String channel = channelInfo.getChannel();
   Map<String, String> extraInfo = channelInfo.getExtraInfo();
}
// key
String value = WalleChannelReader.get(context, "buildtime");

channelFile/configFile

  • : ./gradlew clean assembleReleaseChannels -PchannelList=meituan

  • : ./gradlew clean assembleReleaseChannels -PchannelList=meituan,dianping

  • &:

    ./gradlew clean assembleReleaseChannels -PchannelList=meituan -PextraInfo=buildtime:20161212,hash:xxxxxxx

    : extraInfokey:value``,

  • channelFile: ./gradlew clean assembleReleaseChannels -PchannelFile=/Users/xx/Documents/channel

  • configFile: ./gradlew clean assembleReleaseChannels -PconfigFile=/Users/xx/Documents/config.json

-PchannelFile/configFile -PchannelList,-PchannelFile, -PconfigFile

Walle CLI

APK Signing Block

Q&A

Android

  • apksignerApk
  • 1.1.3wallecommentapk, issue 52

  • Read The Fucking Source Code
  • issue

  • issue
  • PR

License

Copyright 2017 Meituan-Dianping

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Popular Build Tools Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Gradle