Droidcon India 2014

Droidcon India’s fourth edition

Push to Play : A full CI implementation for Android apps using open tools

Submitted by Arnav Gupta (@championswimmer) on Saturday, 25 October 2014

videocam_off

Technical level

Beginner

Section

Versioning – crisp talks

Status

Submitted

Vote on this proposal

Login to vote

Total votes:  +4

Objective

Using three free to use tools/services, namely Github, Travis-CI and Google Play Developer APIs, we can automate the whole process from pusing changes in source code to compilation, signing, and finally publishing to Google Play Store.

I’ll give you a quick demo how you can set up continuous integration for your app in a such a way that even when someone sends a pull request to your repository, you can verify if it builds, and merge it, and publish the updated app to play store without opening up your IDE or even your laptop and performing a single manual step.

Description

Github is service for hosting source code.

Travis-CI is a continuous ingeration service, freely available for Github public repositories. Travis supports seamless Android building on isolated VMs.

Google Play Developer APIs allow you to update your apk, and your store listing descriptions via REST calls from your continuous integration framework.

Combining the three together, you can almost eliminate the need of opening your IDE for minor changes to your app (like correcting a typo in a string).
Travis also builds pull requests to your repository, allowing you to verify someone’s patch before merging it, without having to do it manually.

Having such an integration in place, next time you wish to make that one-line change in your code, you can even do it from your mobile web browser on github, and your app on play store will get updated, all automagically.

In the links section you’ll find some of my apps/libraries that are integrated with Travis-CI. Their build status are very easily visible in this format.
Xperia FOTA Manager Build Status

EventFul Library Build Status

SubtleNews Build Status

SimpleFingerGestures Build Status

Speaker bio

Currently pursuing a Bachelor’s degree in Electrical and Electronics Engineering at Delhi Technological University, while also working at Cube26 as an Android Framework Engineer.
I have been a Developer and Device Maintainer at CyanogenMod and AOKP, making the latest Android source work on Sony Xperia devices, while adding awesome usability features that make users fall in love. A couple of features I have written have also made their way into Google’s Android Open Source Project, and can be found in Kitkat and Android L.
I have been a Open Source community partner with Sony Mobile for the last two years, which basically means I get the latest Xperias to hack around with as soon as they are launched.
At Cube26, I have been part of the team that made many contextually smart UI/UX enhacements for the Micromax Canvas A290, A310, A315 series of phones.
I am also an open source enthusiast with contributions to Linux, GNOME, Arduino, Android and other open source projects.
I was invited as a speaker at Mobile Developer Summit 2014 hosted by Saltmarch Media.

Links

Comments

  • 1
    Arnav Gupta (@championswimmer) Proposer 4 years ago (edited 4 years ago)

    Proposal Review Summary

    Problem Statement

    Considering an opensource app that is hosted on Github, and published via PlayStore, the problem statement we wish to tackle here is how to automate the following steps : -
    1. Verify changes in code automaticalle (including pull reqs)
    2. Build the app, sign with a release key
    3. Publish to the play store.

    Layout/Flow of Talk

    • Enabling Travis-CI for your Android App (for Eclipse ADT Projects)
    • Enabling Travis-CI for your Android App (for Studio/Gradle projects)
    • Signing your App via Travis CI (and keeping your key and it’s secret protected)
    • Publishing the App automatically to Play store from Travis using Google Play Developer APIs

    Target audience

    Mostly Indie developers who have open source apps (hosted on Github like services). Often such apps become popular and people start contributing to it, and verifying, building and publishing such contributions starts becoming a headache.

    Take away

    Travis configuration file examples.

Login with Twitter or Google to leave a comment