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 {
        mavenCentral()
        maven { url "http://oss.sonatype.org/content/repositories/snapshots/" }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.6.+'
        classpath 'com.apphance.flow:apphance-flow:1.1-SNAPSHOT'
    }
}
  
apply plugin: 'android'
apply plugin: 'flow-nbs'
  
flow {
    releaseUrl = 'http://example.com/releaseUrl'
}
  
flowRelease {
    releaseIcon = file('res/drawable-mdpi/ic_launcher.png')
    releaseNotes = "release notes"
}
  
flowMail {
    to = 'your.mail@example.com'
    from = 'your.mail@example.com'
}

Then you can use flow tasks:

gradle imageMontage flowRelease flowMail


Comments