Continuously Break The Android

591 views

Published on

The talk gives an introduction to automatic Android application builds with continuous integration servers. It shares ImmobilienScout24's best practices and experiences on this topic.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
591
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
11
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Continuously Break The Android

  1. 1. www.immobilienscout24.deContinuously Break TheAndroidGDG DevFest Berlin | 13.10.2011 | Hasan Hosgel
  2. 2. About me
  3. 3. Continuous IntegrationIn software engineering, continuous integration (CI) implementscontinuous processes of applying quality control — small pieces ofeffort, applied frequently. Continuous integration aims to improve thequality of software, and to reduce the time taken to deliver it, byreplacing the traditional practice of applying quality control aftercompleting all development.(source: http://wikipedia.org) Continuously Break The Android | GDG DevFest Berlin | Hasan Hosgel
  4. 4. Reasons for Android● faster iterations/ early response● Error free compiling sourcecode on the SCM HEAD● automated tests: Unit Integration SmokeTest Monkeyrunner● using different hardware combinations OS levels density, resolution● automated quality checks: Lint, Findbugs, Checkstyle, PMD Code coverage Continuously Break The Android | GDG DevFest Berlin | Hasan Hosgel
  5. 5. CI Server Jenkins● Needed software Java development kit Android development kit Jenkins● If you are using Ubuntu use a 32-bit installation and install Xvfb (virtual frame buffer) for running the emulator● For ant development  Ant● For Maven development  Maven 3● Install Android emulator Jenkins plugin● SCM plugin Continuously Break The Android | GDG DevFest Berlin | Hasan Hosgel
  6. 6. Using ant as buildingsystem● You don‘t have an ant file? android update project –p <path of the application project> android update test-project -m <path of the application project> -p <path of the test project>● Create a free-style software project in Jenkins● Configure SCM in Jenkins● Configure your emulator (existing or create automatically)● Add ant build step missing dependency mamagement official support Continuously Break The Android | GDG DevFest Berlin | Hasan Hosgel
  7. 7. Using maven as buildingsystem● You don‘t have a maven project? http://www.androidbootstrap.com/● Create a maven project in Jenkins● Configure SCM in Jenkins● Configure your emulator (existing or create automatically)● Add maven commands missing official support, is a XML-hell & complicated dependency management & multi device support (install, run & test) Continuously Break The Android | GDG DevFest Berlin | Hasan Hosgel
  8. 8. Advanced & Best Practices● Multi configuration (parameterised builds, matrix) Different screen sizes Different OS versions Different packages, test size (annotations)● Build chain (automatically) example Compile main OS version: unit- & integration test (package)*, static code analyse & coverage Multi configuration: unit- & integration test (package)* package & sign Release to SCM (not play store)[probably you want it manually]* Using large test suites Continuously Break The Android | GDG DevFest Berlin | Hasan Hosgel
  9. 9. What’s next?Gradle● Gradle is an experimental new Android SDK build system http://tools.android.com/tech-docs/new-build-system● Dependency management● Make it easy to create several variants of an application, multi apk distribution or different flavours of applications● Filtering of resources & manifest (Maps key, signing, etc.)● Actual version 0.2 a new build system not finished yet (if you have knowledge, help the project!)  Continuously Break The Android | GDG DevFest Berlin | Hasan Hosgel
  10. 10. Conclusion Start continuous integration with a CI server Write tests and run them automated Continuously improve your work result & create amazing apps Just do it!  Continuously Break The Android | GDG DevFest Berlin | Hasan Hosgel
  11. 11. Dive Into Topic & Sources● slideshare http://www.slideshare.net/hosgel/continuously-break-theandroid● Jenkins http://jenkins-ci.org/● Android Developer http://developer.android.com/● Maven Android plugin http://code.google.com/p/maven-android-plugin/ http://www.androidbootstrap.com/● Gradle http://www.gradle.org/ http://tools.android.com/tech-docs/new-build-system Continuously Break The Android | GDG DevFest Berlin | Hasan Hosgel
  12. 12. http://karriere.immobilienscout24.deWe are searching for newcolleagues!contact:Immobilien Scout GmbH Hasan HosgelAndreasstraße 10 Twitter alosdev10243 Berlin Github alosdev

×