Using Flow with Android gradle plugin

Android New Build System comes with build-in variants management support. What is missing is the release artifacts generation. For this purpose Apphance Flow can be used. You simply add flow to buildscript classpath and apply flow plugin.
Following tasks will appear in you build:
  • imageMontage
  • flowRelease
  • flowMail

To generate image montage, release page with all variants and prepare mail message you can write following code into you build.gradle

buildscript {
    repositories {
        maven { url "" }
    dependencies {
        classpath ''
        classpath 'com.apphance.flow:apphance-flow:1.1-SNAPSHOT'
apply plugin: 'android'
apply plugin: 'flow-nbs'
flow {
    releaseUrl = ''
flowRelease {
    releaseIcon = file('res/drawable-mdpi/ic_launcher.png')
    releaseNotes = "release notes"
flowMail {
    to = ''
    from = ''

Then you can use flow tasks:

gradle imageMontage flowRelease flowMail