Skip to content

A Gradle plugin for automating the QA build process

Notifications You must be signed in to change notification settings

hanekedesign/haneke-build

Repository files navigation

Haneke Build

The goal of this plugin is to automate deployment and organization tasks for Android Apps built at Haneke Design

Beta Plugin Installation

  1. Your root directory build.gradle should include the following
buildscript {
    repositories {
        jcenter()
        flatDir dirs: 'build-plugin/lib'
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.0'
        classpath 'com.hanekedesign:haneke-build:0.0.1'

    }
}
  1. Download the beta plugin jar from:
    http://demo.hanekedesign.com/Android/haneke-build-0.0.1.jar
    and place it in the following directory:
    /build-plugin/lib

  2. At the top of your app build.gradle, add the line:
    apply plugin: 'haneke-build'

  3. Set the app's versionCode and VersionName to project.haneke.x to take advantage of the auto incrementing build numbers. The build numbers can be manually changed in a file called version.properties

defaultConfig {
   versionCode project.haneke.versionCode
   versionName project.haneke.versionName
}
  1. Add the following block to your app build.grade:
project.haneke{
    def props = new Properties()
    props.load(new FileInputStream("sensitive.properties"))
    ftpPassword = props.ftpPassword
    ftpUser = props.ftpUser
    ftpAddress = props.ftpAddress
    donedoneApiKey = props.donedoneApiKey
    donedoneUsername = props.donedoneUsername
    clientName = ''
    projectName = ''
    donedoneProjectId = 58504
}
  1. Fill in values for ClientName and ProjectName. These are for identifying where builds will be found in the demo server. To automatically create Done Done releases when a new QA build is pushed out, add the donedoneProjectId

Your app build.grade should look something like this:

apply plugin: 'com.android.application'
apply plugin: 'haneke-build'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.myapp.app"
        minSdkVersion 19
        targetSdkVersion 25
        versionCode project.haneke.versionCode
        versionName project.haneke.versionName
    }
}

project.haneke{
    def props = new Properties()
    props.load(new FileInputStream("sensitive.properties"))
    ftpPassword = props.ftpPassword
    ftpUser = props.ftpUser
    ftpAddress = props.ftpAddress
    donedoneApiKey = props.donedoneApiKey
    donedoneUsername = props.donedoneUsername
    clientName = 'MyClient'
    projectName = 'MyProject'
    donedoneProjectId = 58504
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:25.2.0'
    testCompile 'junit:junit:4.12'
}

Usage and Tasks

After a succesful sync of your project, your Gradle tab will have a new group called 'haneke' with the following tasks:

  • doneDoneReleaseTask:
    creates a new Done Done Release if the project.haneke{} block has a donedoneProjectId defined
  • HanekeFtpUploadDebug:
    assembles the current project and uploads a debug build to the demo server under:
    demo.hanekedesign.com/Android/clientName/projectName/(version)/apk_name.apk
  • hanekeIncrementBuild:
    increments the version numbers found in version.properties. These values can be used as variables in your build.grade

About

A Gradle plugin for automating the QA build process

Resources

Stars

Watchers

Forks

Packages

No packages published