Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Continuous Delivery for Android

Continuous Delivery for Android

Presented at Coding Serbia conference 2014

Abstract:
First Android phone was introduced in 2008 and now Android is dominating the market by a large margin. In these six years demand for Android development skills has increased significantly and is followed by demand of good tools to support fast and sustainable development of more complex applications.
Introduction of Gradle build system for Android application opened door for automating development processes. This includes automated builds, test runs and code quality inspections. Adding the automated application builds distribution to this list enables the closing of the continuous delivery cycle.
This talk will show how to integrate Continuous Delivery into your Android development using available open source tools.

Nemanja Nedic

October 09, 2014
Tweet

More Decks by Nemanja Nedic

Other Decks in Programming

Transcript

  1. Principles Every commit (push) can be a release candidate Automate

    (almost) everything Put everything in SCM Build only once Get feedback as early as possible Done means released
  2. Build pipeline Automated manifestation of delivery process Establish automated quality

    gates Consists of build stages and steps Commit stage Automated acceptance test stage Manual test stage Release stage
  3. Build steps for Android projects There is no easy way

    to automate publishing to Play Store What about automated acceptance tests? Build Run tests Code quality Upload artifacts Beta distribution
  4. Build Initial step of the pipeline Initiated on every commit

    (push) Compile and assemble clean assemble
  5. Run tests Android tests require connected device or emulator Can

    be slow Create coverage report connectedCheck createDebugCoverageReport
  6. Code quality Android Lint is your friend Use SonarQube for

    tracking the code quality Inspect code with SonarRunner Gradle plugin lint sonarRunner
  7. Upload artifacts to Nexus Nexus is a good place to

    archive your builds Use Maven Gradle plugin uploadArchives
  8. Upload APKs to Crashlytics Easy distribution of the builds to

    internal or external testers Also does crash reporting and analytics Setup using IDE plugin Use Crashlytics Gradle plugin crashlyticsUploadDistributionRelease
  9. Build name setter plugin Define more readable build names that

    can be consistent across the build jobs
  10. Resources Continuous Delivery: Reliable Software Releases through Build, Test, and

    Deployment Automation http://www.amazon.com/Continuous-Delivery-Deployment- Automation-Addison-Wesley/dp/0321601912/ Building a Continuous Delivery Pipeline with Gradle and Jenkins http://www.infoq.com/presentations/cd-gradle-jenkins Sample app https://github.com/nemanjanedic/weatherly