Upload
hasan-hosgel
View
457
Download
0
Embed Size (px)
DESCRIPTION
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.
Citation preview
www.immobilienscout24.de
Continuously Break The Android
GDG DevFest Berlin | 13.10.2011 | Hasan Hosgel
About me
Hasan Hoşgel (Hosgel)Twitter: @alosdevGithub: alosdevG+: Hasan Hosgel
Senior Developer @ImmobilienScout24
Mobile enthusiast, Man of action
Continuously Break The Android | GDG DevFest Berlin | Hasan Hosgel
Continuous Integration
In software engineering, continuous integration (CI) implements continuous processes of applying quality control — small pieces of effort, applied frequently. Continuous integration aims to improve the quality of software, and to reduce the time taken to deliver it, by replacing the traditional practice of applying quality control after completing all development. (source: http://wikipedia.org)
Reasons for Android
Continuously Break The Android | GDG DevFest Berlin | Hasan Hosgel
● faster iterations/ early response
● Error free compiling sourcecode on the SCM HEAD
● automated tests:UnitIntegrationSmokeTestMonkeyrunner
● using different hardware combinationsOS levelsdensity, resolution
● automated quality checks:Lint, Findbugs, Checkstyle, PMDCode coverage
CI Server Jenkins
Continuously Break The Android | GDG DevFest Berlin | Hasan Hosgel
● Needed softwareJava development kitAndroid development kitJenkins
● 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
Using ant as buildingsystem
Continuously Break The Android | GDG DevFest Berlin | Hasan Hosgel
● 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
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
Advanced & Best Practices
● Multi configuration (parameterised builds, matrix)Different screen sizesDifferent OS versionsDifferent packages, test size (annotations)
● Build chain (automatically) exampleCompilemain OS version: unit- & integration test (package)*, static code analyse & coverageMulti configuration: unit- & integration test (package)*package & signRelease to SCM (not play store)[probably you want it manually]
* Using large test suites
Continuously Break The Android | GDG DevFest Berlin | Hasan Hosgel
What’s next?Gradle
● Gradle is an experimental new Android SDK build systemhttp://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!)
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
Dive Into Topic & Sources
Continuously Break The Android | GDG DevFest Berlin | Hasan Hosgel
● slidesharehttp://www.slideshare.net/hosgel/continuously-break-theandroid
● Jenkinshttp://jenkins-ci.org/
● Android Developerhttp://developer.android.com/
● Maven Android pluginhttp://code.google.com/p/maven-android-plugin/ http://www.androidbootstrap.com/
● Gradlehttp://www.gradle.org/ http://tools.android.com/tech-docs/new-build-system
http://karriere.immobilienscout24.de
We are searching for new colleagues!contact:Immobilien Scout GmbHAndreasstraße 1010243 Berlin
Hasan HosgelTwitter alosdevGithub alosdev