SlideShare une entreprise Scribd logo
1  sur  27
29/2/2012
Continuous Integration for Android Apps
Anthony Dahanne, Eng.
@anthonydahanne
http://blog.dahanne.net
@anthonydahanne 2
Continuous Integration for Android Apps
Getting to know each other ...
Work @compuware on a APM software based on
OSGi and Equinox
Develop an open source app on Android,
ReGalAndroid
Work on Continuous Integration (contribute to tools
such as Maven Tycho, m2e-android)
@anthonydahanne 3
Continuous Integration for Android Apps
Continuous Integration for Android Apps
A gentle introduction to Continuous Integration
Building an Android app
Testing an Android App
Setting up a CI tool for Android development
Going further than CI...
@anthonydahanne 4
Continuous Integration for Android Apps
A gentle introduction to Continuous
Integration (CI)
@anthonydahanne 5
Continuous Integration for Android Apps
A gentle introduction to CI : what is it ?
“the practice of frequently integrating one's new or changed
code with the existing code repository” Wikipedia
Each code change triggers a new build of the software
Each build should be working (not broken)
CI jobs occur on dedicated machines running CI tools such as
Hudson/Jenkins/CruiseControl/Bamboo/TravisCI
@anthonydahanne 6
Continuous Integration for Android Apps
A gentle introduction to CI : benefits ?
Coding within a team,
makes sure no one commits broken code
makes it easy to get the latest good build
And more generally
Eases the distribution of your software
Shows the quality and robustness of your code
@anthonydahanne 7
Continuous Integration for Android Apps
Building an Android app
@anthonydahanne 8
Continuous Integration for Android Apps
Building an Android app
@anthonydahanne 9
Continuous Integration for Android Apps
Building an Android app
@anthonydahanne 10
Continuous Integration for Android Apps
Building an Android app : outside the IDE
ADT exists for each major platform (Win, Linux, Mac)
The IDE integration is only (officially) provided for Eclipse
For Continuous Integration, we want to :
Build outside the IDE,
Build on the command line, so that a CI tool can run the
build
@anthonydahanne 11
Continuous Integration for Android Apps
Building an Android app : the choices
In the Java world, the main build automation tools are Ant and
Maven (equivalent of make in the C world)
Apache Ant
Appeared in 2000
Very versatile
Still very popular
Apache Maven
Convention over configuration
Build lifecycle
Dependencies management
@anthonydahanne 12
Continuous Integration for Android Apps
Building an Android app : with Ant
Ant is the official building tool chosen by the ADT team
The Ant script can be generated and used easily from an
Android project :
> android update project --path ./
Updated local.properties
Added file ./build.xml
Updated file ./proguard.cfg
> ant debug install
[…]
BUILD SUCCESSFUL
Demo : generate an ant script
to build your project
@anthonydahanne 13
Continuous Integration for Android Apps
Building an Android app : with Maven
Maven privileges “convention over configuration”
It is extensible via plugins (eg : android-maven-plugin !)
Project dependencies are fetched and cached
It provides a default execution lifecycle (you can bound a
plugin execution to each phase of the lifecycle)
@anthonydahanne 14
Continuous Integration for Android Apps
Building an Android app : with Maven
compilerplugin
compile
surefire plugin
test
validate
compile
test
package
integration-test
verify
install
deploy
deploy plugin
deploy
The“default”lifecycle
This schema is taken from Fabrizio Giudici
“Building Android Apps with Maven” slides
@anthonydahanne 15
Continuous Integration for Android Apps
Building an Android app : with Maven
2 ways to get started with a Maven enabled Android project :
Start from scratch with android archetypes :
Copy and adapt an existing pom.xml
> mvn archetype:generate 
-DarchetypeArtifactId=android-quickstart 
-DarchetypeGroupId=de.akquinet.android.archetypes 
-DarchetypeVersion=1.0.7 
-DgroupId=your.company 
-DartifactId=my-android-application
> cd my-android-application
> mvn install android:deploy android:run
Demo : generate a Maven pom
to build your project
@anthonydahanne 16
Continuous Integration for Android Apps
Building an Android app : with Maven
commons-gallery
ReGalAndroid app
g2-java-client
g3-java-client
jiwigo-ws-api
commons-io
httpclient
json
httpclient
httpmime
commons-lang
httpcore
commons-logging
commons-codec
(transitive)
dependencies
@anthonydahanne 17
Continuous Integration for Android Apps
Building an Android app : which one to choose ?
The Ant script
Is generated by ADT but
Does not deal with dependencies (must copy to lib/)
And is not easily extensible
The Android Maven Plugin
Covers all android specific build steps (proguard, etc...)
Is integrated in the Eclipse IDE (thanks to m2e-android)
Leverages existing Maven plugins (deploy, replace,etc...)
@anthonydahanne 18
Continuous Integration for Android Apps
Testing an Android app
@anthonydahanne 19
Continuous Integration for Android Apps
Testing an Android app
Outside an emulator :
Externalize your logic in plain jars
Use an “Android Mocker” (robolectric)
Inside an emulator
Integration testing : tests run in a real device (robotium
helps !)
@anthonydahanne 20
Continuous Integration for Android Apps
Testing an Android App
ReGalAndroid app
ReGalAndroid Integration tests
1. Install the app
2. Install the test app
3. run the app and run the test app
Demo : running ReGalAndroid
integration tests
@anthonydahanne 21
Continuous Integration for Android Apps
Setting up a CI tool for Android
development
@anthonydahanne 22
Continuous Integration for Android Apps
Setting up a CI tool
As long as the CI tool supports Maven it should work
Environment must be set up
PATH + JAVA_HOME, M2_HOME, ANDROID_HOME set
Download the SDK and :
> android update sdk --no-ui --obsolete –force
(be careful >2GB as of January '12)
> android update sdk --no-ui -t platform –force
(just the Android platforms, no samples, no addons, no extras...)
> android update sdk --no-ui -t platform-tools –force
(Android platform-tools : aadt, adb, etc...)
> android create avd -n 23 -t 9 -c 16M -b armeabi
(to create an AVD/Emulator)
@anthonydahanne 23
Continuous Integration for Android Apps
Setting up a CI tool : case of a server (not GUI)
Android Emulator
Is needed for the integration tests
But needs an X server !
Hudson/Jenkins Xvnc plugin to the rescue !
Or, even better, Hudson/Jenkins Android Emulator PluginDemo : a Jenkins job building
an android app
@anthonydahanne 24
Continuous Integration for Android Apps
Going further than Continuous Integration
@anthonydahanne 25
Continuous Integration for Android Apps
Going further than CI : continuous quality control
At each build, check :
The tests run
Code coverage of the tests
Quality metrics of the tests, with Checkstyle, Findbugs,
PMD /CPD
Sonar does it all !
Quality dashboard of your projects
Provides : timeline, rules, diagrams, high level views, etc.
@anthonydahanne 26
Continuous Integration for Android Apps
Going further than CI : continuous deployment
At each build (or milestone / nightly builds)
Deploy to a an archive repository (such as Nexus)
Use some tooling to push to devices ?
@anthonydahanne 27
Continuous Integration for Android Apps
Thank you …
Now please vote
and react on https://joind.in/6032 !
Art
The template used for this presentation was the LibreOffice Presentation Template 1.0
The Android pictures belong to Google http://tools.android.com/overview
Tools, documentation, useful blogs for Android development and CI
Documentation on the Android Maven Plugin can be found reading the
Maven Reference Book
Updating Android SDK from the command line
Manfred Moser's blog
Using Android Maven Artifacts
See a device screen on your computer : Droid@Screen
Use Hudson/Jenkins or try TravisCI out, for CI Sonar, to check on your code quality , and
Nexus as an artifact repository manager

Contenu connexe

Tendances

Tips for better CI on Android
Tips for better CI on AndroidTips for better CI on Android
Tips for better CI on AndroidTomoaki Imai
 
Continuous Integration of Mobile Apps with Docker and Appium
Continuous Integration of Mobile Apps with Docker and AppiumContinuous Integration of Mobile Apps with Docker and Appium
Continuous Integration of Mobile Apps with Docker and AppiumEmergya
 
GitHub Actions for 5 minutes
GitHub Actions for 5 minutesGitHub Actions for 5 minutes
GitHub Actions for 5 minutesSvetlin Nakov
 
Building the Test Automation Framework - Jenkins for Testers
Building the Test Automation Framework - Jenkins for TestersBuilding the Test Automation Framework - Jenkins for Testers
Building the Test Automation Framework - Jenkins for TestersWilliam Echlin
 
QAAgility Presentation - Cucumber with Appium
QAAgility Presentation - Cucumber with AppiumQAAgility Presentation - Cucumber with Appium
QAAgility Presentation - Cucumber with AppiumQAAgility Technologies
 
Mobile UI Testing using Appium and Docker
Mobile UI Testing using Appium and DockerMobile UI Testing using Appium and Docker
Mobile UI Testing using Appium and DockerMoataz Nabil
 
3x3: Speeding Up Mobile Releases
3x3: Speeding Up Mobile Releases3x3: Speeding Up Mobile Releases
3x3: Speeding Up Mobile ReleasesDrew Hannay
 
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019Sargis Sargsyan
 
Trust Your Pipeline - Automatically Testing and End-to-End Java Application
Trust Your Pipeline - Automatically Testing and End-to-End Java ApplicationTrust Your Pipeline - Automatically Testing and End-to-End Java Application
Trust Your Pipeline - Automatically Testing and End-to-End Java ApplicationElias Nogueira
 
Intro to Eclipse Che, by Tyler Jewell
Intro to Eclipse Che, by Tyler JewellIntro to Eclipse Che, by Tyler Jewell
Intro to Eclipse Che, by Tyler Jewelljwi11iams
 
Continuous integration using Bamboo
Continuous integration using BambooContinuous integration using Bamboo
Continuous integration using BambooTudor Hornai
 
An Introduction to Eclipse Che - Next-Gen Eclipse Java IDE
An Introduction to Eclipse Che - Next-Gen Eclipse Java IDEAn Introduction to Eclipse Che - Next-Gen Eclipse Java IDE
An Introduction to Eclipse Che - Next-Gen Eclipse Java IDEKubeAcademy
 
Android Functional UI Testing at Amplify
Android Functional UI Testing at AmplifyAndroid Functional UI Testing at Amplify
Android Functional UI Testing at Amplifyjdlloyd1
 
Eclipse RCP outside of Eclipse IDE - Gradle to the rescue!
Eclipse RCP outside of Eclipse IDE - Gradle to the rescue!Eclipse RCP outside of Eclipse IDE - Gradle to the rescue!
Eclipse RCP outside of Eclipse IDE - Gradle to the rescue!Michał Ćmil
 
Java Test Automation for REST, Web and Mobile
Java Test Automation for REST, Web and MobileJava Test Automation for REST, Web and Mobile
Java Test Automation for REST, Web and MobileElias Nogueira
 
(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...
(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...
(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...Amazon Web Services
 
Deploy your app with one Slack command
Deploy your app with one Slack commandDeploy your app with one Slack command
Deploy your app with one Slack commandFabio Milano
 
Improve Development Process with Open Source Software
Improve Development Process with Open Source SoftwareImprove Development Process with Open Source Software
Improve Development Process with Open Source Softwareelliando dias
 
Eclipse Che: The Next-Gen Eclipse IDE - Bordeaux jug 2016
Eclipse Che: The Next-Gen Eclipse IDE - Bordeaux jug 2016Eclipse Che: The Next-Gen Eclipse IDE - Bordeaux jug 2016
Eclipse Che: The Next-Gen Eclipse IDE - Bordeaux jug 2016Florent BENOIT
 
QConSP 2014 - Continuous Delivery - Part 03 - Continuous Integration
QConSP 2014 - Continuous Delivery - Part 03 - Continuous IntegrationQConSP 2014 - Continuous Delivery - Part 03 - Continuous Integration
QConSP 2014 - Continuous Delivery - Part 03 - Continuous IntegrationRodrigo Russo
 

Tendances (20)

Tips for better CI on Android
Tips for better CI on AndroidTips for better CI on Android
Tips for better CI on Android
 
Continuous Integration of Mobile Apps with Docker and Appium
Continuous Integration of Mobile Apps with Docker and AppiumContinuous Integration of Mobile Apps with Docker and Appium
Continuous Integration of Mobile Apps with Docker and Appium
 
GitHub Actions for 5 minutes
GitHub Actions for 5 minutesGitHub Actions for 5 minutes
GitHub Actions for 5 minutes
 
Building the Test Automation Framework - Jenkins for Testers
Building the Test Automation Framework - Jenkins for TestersBuilding the Test Automation Framework - Jenkins for Testers
Building the Test Automation Framework - Jenkins for Testers
 
QAAgility Presentation - Cucumber with Appium
QAAgility Presentation - Cucumber with AppiumQAAgility Presentation - Cucumber with Appium
QAAgility Presentation - Cucumber with Appium
 
Mobile UI Testing using Appium and Docker
Mobile UI Testing using Appium and DockerMobile UI Testing using Appium and Docker
Mobile UI Testing using Appium and Docker
 
3x3: Speeding Up Mobile Releases
3x3: Speeding Up Mobile Releases3x3: Speeding Up Mobile Releases
3x3: Speeding Up Mobile Releases
 
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
 
Trust Your Pipeline - Automatically Testing and End-to-End Java Application
Trust Your Pipeline - Automatically Testing and End-to-End Java ApplicationTrust Your Pipeline - Automatically Testing and End-to-End Java Application
Trust Your Pipeline - Automatically Testing and End-to-End Java Application
 
Intro to Eclipse Che, by Tyler Jewell
Intro to Eclipse Che, by Tyler JewellIntro to Eclipse Che, by Tyler Jewell
Intro to Eclipse Che, by Tyler Jewell
 
Continuous integration using Bamboo
Continuous integration using BambooContinuous integration using Bamboo
Continuous integration using Bamboo
 
An Introduction to Eclipse Che - Next-Gen Eclipse Java IDE
An Introduction to Eclipse Che - Next-Gen Eclipse Java IDEAn Introduction to Eclipse Che - Next-Gen Eclipse Java IDE
An Introduction to Eclipse Che - Next-Gen Eclipse Java IDE
 
Android Functional UI Testing at Amplify
Android Functional UI Testing at AmplifyAndroid Functional UI Testing at Amplify
Android Functional UI Testing at Amplify
 
Eclipse RCP outside of Eclipse IDE - Gradle to the rescue!
Eclipse RCP outside of Eclipse IDE - Gradle to the rescue!Eclipse RCP outside of Eclipse IDE - Gradle to the rescue!
Eclipse RCP outside of Eclipse IDE - Gradle to the rescue!
 
Java Test Automation for REST, Web and Mobile
Java Test Automation for REST, Web and MobileJava Test Automation for REST, Web and Mobile
Java Test Automation for REST, Web and Mobile
 
(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...
(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...
(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...
 
Deploy your app with one Slack command
Deploy your app with one Slack commandDeploy your app with one Slack command
Deploy your app with one Slack command
 
Improve Development Process with Open Source Software
Improve Development Process with Open Source SoftwareImprove Development Process with Open Source Software
Improve Development Process with Open Source Software
 
Eclipse Che: The Next-Gen Eclipse IDE - Bordeaux jug 2016
Eclipse Che: The Next-Gen Eclipse IDE - Bordeaux jug 2016Eclipse Che: The Next-Gen Eclipse IDE - Bordeaux jug 2016
Eclipse Che: The Next-Gen Eclipse IDE - Bordeaux jug 2016
 
QConSP 2014 - Continuous Delivery - Part 03 - Continuous Integration
QConSP 2014 - Continuous Delivery - Part 03 - Continuous IntegrationQConSP 2014 - Continuous Delivery - Part 03 - Continuous Integration
QConSP 2014 - Continuous Delivery - Part 03 - Continuous Integration
 

En vedette

Android Continuous Integration and Automation - Enrique Lopez Manas, Sixt
Android Continuous Integration and Automation - Enrique Lopez Manas, SixtAndroid Continuous Integration and Automation - Enrique Lopez Manas, Sixt
Android Continuous Integration and Automation - Enrique Lopez Manas, SixtDroidConTLV
 
Metaprogramming with Groovy
Metaprogramming with GroovyMetaprogramming with Groovy
Metaprogramming with GroovyGR8Conf
 
Groovy Powered Clean Code
Groovy Powered Clean CodeGroovy Powered Clean Code
Groovy Powered Clean CodeGR8Conf
 
Groovy in the Cloud
Groovy in the CloudGroovy in the Cloud
Groovy in the CloudDaniel Woods
 
Metaprogramming with Groovy
Metaprogramming with GroovyMetaprogramming with Groovy
Metaprogramming with GroovyAli Tanwir
 
Kotlin, smarter development for the jvm
Kotlin, smarter development for the jvmKotlin, smarter development for the jvm
Kotlin, smarter development for the jvmArnaud Giuliani
 
Spring one 2012 Groovy as a weapon of maas PaaSification
Spring one 2012 Groovy as a weapon of maas PaaSificationSpring one 2012 Groovy as a weapon of maas PaaSification
Spring one 2012 Groovy as a weapon of maas PaaSificationNenad Bogojevic
 
We thought we were doing continuous delivery and then...
We thought we were doing continuous delivery and then... We thought we were doing continuous delivery and then...
We thought we were doing continuous delivery and then... Suzie Prince
 
Java collections the force awakens
Java collections  the force awakensJava collections  the force awakens
Java collections the force awakensRichardWarburton
 
Groovy for java developers
Groovy for java developersGroovy for java developers
Groovy for java developersPuneet Behl
 
Reactive Streams and the Wide World of Groovy
Reactive Streams and the Wide World of GroovyReactive Streams and the Wide World of Groovy
Reactive Streams and the Wide World of GroovySteve Pember
 
Be More Productive with Kotlin
Be More Productive with KotlinBe More Productive with Kotlin
Be More Productive with KotlinBrandon Wever
 
Groovy on Android (as of 2016)
Groovy on Android (as of 2016)Groovy on Android (as of 2016)
Groovy on Android (as of 2016)Kevin H.A. Tan
 
Building an Extensible, Resumable DSL on Top of Apache Groovy
Building an Extensible, Resumable DSL on Top of Apache GroovyBuilding an Extensible, Resumable DSL on Top of Apache Groovy
Building an Extensible, Resumable DSL on Top of Apache Groovyjgcloudbees
 
Java 8 and 9 in Anger
Java 8 and 9 in AngerJava 8 and 9 in Anger
Java 8 and 9 in AngerTrisha Gee
 
Kotlin for Android - Vali Iorgu - mRready
Kotlin for Android - Vali Iorgu - mRreadyKotlin for Android - Vali Iorgu - mRready
Kotlin for Android - Vali Iorgu - mRreadyMobileAcademy
 
Apache Groovy: the language and the ecosystem
Apache Groovy: the language and the ecosystemApache Groovy: the language and the ecosystem
Apache Groovy: the language and the ecosystemKostas Saidis
 
Groovyscriptingformanualandautomationtestingusingrobotframework 141221014703-...
Groovyscriptingformanualandautomationtestingusingrobotframework 141221014703-...Groovyscriptingformanualandautomationtestingusingrobotframework 141221014703-...
Groovyscriptingformanualandautomationtestingusingrobotframework 141221014703-...Bhaskara Reddy Sannapureddy
 
Java 8 new features or the ones you might actually use
Java 8 new features or the ones you might actually useJava 8 new features or the ones you might actually use
Java 8 new features or the ones you might actually useSharon Rozinsky
 

En vedette (20)

Android Continuous Integration and Automation - Enrique Lopez Manas, Sixt
Android Continuous Integration and Automation - Enrique Lopez Manas, SixtAndroid Continuous Integration and Automation - Enrique Lopez Manas, Sixt
Android Continuous Integration and Automation - Enrique Lopez Manas, Sixt
 
Metaprogramming with Groovy
Metaprogramming with GroovyMetaprogramming with Groovy
Metaprogramming with Groovy
 
Groovy Powered Clean Code
Groovy Powered Clean CodeGroovy Powered Clean Code
Groovy Powered Clean Code
 
Groovy on Android
Groovy on AndroidGroovy on Android
Groovy on Android
 
Groovy in the Cloud
Groovy in the CloudGroovy in the Cloud
Groovy in the Cloud
 
Metaprogramming with Groovy
Metaprogramming with GroovyMetaprogramming with Groovy
Metaprogramming with Groovy
 
Kotlin, smarter development for the jvm
Kotlin, smarter development for the jvmKotlin, smarter development for the jvm
Kotlin, smarter development for the jvm
 
Spring one 2012 Groovy as a weapon of maas PaaSification
Spring one 2012 Groovy as a weapon of maas PaaSificationSpring one 2012 Groovy as a weapon of maas PaaSification
Spring one 2012 Groovy as a weapon of maas PaaSification
 
We thought we were doing continuous delivery and then...
We thought we were doing continuous delivery and then... We thought we were doing continuous delivery and then...
We thought we were doing continuous delivery and then...
 
Java collections the force awakens
Java collections  the force awakensJava collections  the force awakens
Java collections the force awakens
 
Groovy for java developers
Groovy for java developersGroovy for java developers
Groovy for java developers
 
Reactive Streams and the Wide World of Groovy
Reactive Streams and the Wide World of GroovyReactive Streams and the Wide World of Groovy
Reactive Streams and the Wide World of Groovy
 
Be More Productive with Kotlin
Be More Productive with KotlinBe More Productive with Kotlin
Be More Productive with Kotlin
 
Groovy on Android (as of 2016)
Groovy on Android (as of 2016)Groovy on Android (as of 2016)
Groovy on Android (as of 2016)
 
Building an Extensible, Resumable DSL on Top of Apache Groovy
Building an Extensible, Resumable DSL on Top of Apache GroovyBuilding an Extensible, Resumable DSL on Top of Apache Groovy
Building an Extensible, Resumable DSL on Top of Apache Groovy
 
Java 8 and 9 in Anger
Java 8 and 9 in AngerJava 8 and 9 in Anger
Java 8 and 9 in Anger
 
Kotlin for Android - Vali Iorgu - mRready
Kotlin for Android - Vali Iorgu - mRreadyKotlin for Android - Vali Iorgu - mRready
Kotlin for Android - Vali Iorgu - mRready
 
Apache Groovy: the language and the ecosystem
Apache Groovy: the language and the ecosystemApache Groovy: the language and the ecosystem
Apache Groovy: the language and the ecosystem
 
Groovyscriptingformanualandautomationtestingusingrobotframework 141221014703-...
Groovyscriptingformanualandautomationtestingusingrobotframework 141221014703-...Groovyscriptingformanualandautomationtestingusingrobotframework 141221014703-...
Groovyscriptingformanualandautomationtestingusingrobotframework 141221014703-...
 
Java 8 new features or the ones you might actually use
Java 8 new features or the ones you might actually useJava 8 new features or the ones you might actually use
Java 8 new features or the ones you might actually use
 

Similaire à Ci for-android-apps

React native automation testing
React native automation testingReact native automation testing
React native automation testingJayad Aadrit
 
Ionic Mobile Applications - Hybrid Mobile Applications Without Compromises
Ionic Mobile Applications - Hybrid Mobile Applications Without CompromisesIonic Mobile Applications - Hybrid Mobile Applications Without Compromises
Ionic Mobile Applications - Hybrid Mobile Applications Without CompromisesJacob Friesen
 
Continuous delivery for Android
Continuous delivery for AndroidContinuous delivery for Android
Continuous delivery for AndroidLeena N
 
Mobile Application Development-Lecture 03 & 04.pdf
Mobile Application Development-Lecture 03 & 04.pdfMobile Application Development-Lecture 03 & 04.pdf
Mobile Application Development-Lecture 03 & 04.pdfAbdullahMunir32
 
Android deep dive
Android deep diveAndroid deep dive
Android deep diveAnuSahniNCI
 
Android Annotations and RoboGuice
Android Annotations and RoboGuiceAndroid Annotations and RoboGuice
Android Annotations and RoboGuiceJoel Sticha
 
Hybrid Mobile Apps - Meetup
Hybrid Mobile Apps - MeetupHybrid Mobile Apps - Meetup
Hybrid Mobile Apps - MeetupSanjay Patel
 
Automate App Container Delivery with CI/CD and DevOps
Automate App Container Delivery with CI/CD and DevOpsAutomate App Container Delivery with CI/CD and DevOps
Automate App Container Delivery with CI/CD and DevOpsDaniel Oh
 
Porting business apps to Windows Phone
Porting business apps to Windows PhonePorting business apps to Windows Phone
Porting business apps to Windows PhoneMichele Capra
 
Ionic vs flutter best platform for hybrid app development
Ionic vs flutter  best platform for hybrid app developmentIonic vs flutter  best platform for hybrid app development
Ionic vs flutter best platform for hybrid app developmentMarkovate
 
Android Interview Questions
Android Interview QuestionsAndroid Interview Questions
Android Interview QuestionsGaurav Mehta
 
Common Ionic Development Mistakes Developers Tend To Make!
Common Ionic Development Mistakes Developers Tend To Make!Common Ionic Development Mistakes Developers Tend To Make!
Common Ionic Development Mistakes Developers Tend To Make!Techugo
 
What To Choose Between - Native App And Hybrid Mobile App
What To Choose Between - Native App And Hybrid Mobile AppWhat To Choose Between - Native App And Hybrid Mobile App
What To Choose Between - Native App And Hybrid Mobile AppMindbowser Inc
 
Live Streaming Application Development
Live Streaming Application DevelopmentLive Streaming Application Development
Live Streaming Application DevelopmentMarie Weaver
 

Similaire à Ci for-android-apps (20)

React native automation testing
React native automation testingReact native automation testing
React native automation testing
 
My android
My androidMy android
My android
 
My android
My androidMy android
My android
 
Ionic Mobile Applications - Hybrid Mobile Applications Without Compromises
Ionic Mobile Applications - Hybrid Mobile Applications Without CompromisesIonic Mobile Applications - Hybrid Mobile Applications Without Compromises
Ionic Mobile Applications - Hybrid Mobile Applications Without Compromises
 
Continuous delivery for Android
Continuous delivery for AndroidContinuous delivery for Android
Continuous delivery for Android
 
Mobile Application Development-Lecture 03 & 04.pdf
Mobile Application Development-Lecture 03 & 04.pdfMobile Application Development-Lecture 03 & 04.pdf
Mobile Application Development-Lecture 03 & 04.pdf
 
Ionic2 First Lesson of Four
Ionic2 First Lesson of FourIonic2 First Lesson of Four
Ionic2 First Lesson of Four
 
Capacitor 1.0 launch
Capacitor 1.0 launchCapacitor 1.0 launch
Capacitor 1.0 launch
 
Android deep dive
Android deep diveAndroid deep dive
Android deep dive
 
Android Annotations and RoboGuice
Android Annotations and RoboGuiceAndroid Annotations and RoboGuice
Android Annotations and RoboGuice
 
Hybrid Mobile Apps - Meetup
Hybrid Mobile Apps - MeetupHybrid Mobile Apps - Meetup
Hybrid Mobile Apps - Meetup
 
Ionic
IonicIonic
Ionic
 
Automate App Container Delivery with CI/CD and DevOps
Automate App Container Delivery with CI/CD and DevOpsAutomate App Container Delivery with CI/CD and DevOps
Automate App Container Delivery with CI/CD and DevOps
 
Porting business apps to Windows Phone
Porting business apps to Windows PhonePorting business apps to Windows Phone
Porting business apps to Windows Phone
 
Ionic vs flutter best platform for hybrid app development
Ionic vs flutter  best platform for hybrid app developmentIonic vs flutter  best platform for hybrid app development
Ionic vs flutter best platform for hybrid app development
 
Android Interview Questions
Android Interview QuestionsAndroid Interview Questions
Android Interview Questions
 
Android interview questions
Android interview questionsAndroid interview questions
Android interview questions
 
Common Ionic Development Mistakes Developers Tend To Make!
Common Ionic Development Mistakes Developers Tend To Make!Common Ionic Development Mistakes Developers Tend To Make!
Common Ionic Development Mistakes Developers Tend To Make!
 
What To Choose Between - Native App And Hybrid Mobile App
What To Choose Between - Native App And Hybrid Mobile AppWhat To Choose Between - Native App And Hybrid Mobile App
What To Choose Between - Native App And Hybrid Mobile App
 
Live Streaming Application Development
Live Streaming Application DevelopmentLive Streaming Application Development
Live Streaming Application Development
 

Plus de Anthony Dahanne

Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Anthony Dahanne
 
No more Dockerfiles? Buildpacks to help you ship your image!
No more Dockerfiles? Buildpacks to help you ship your image!No more Dockerfiles? Buildpacks to help you ship your image!
No more Dockerfiles? Buildpacks to help you ship your image!Anthony Dahanne
 
CNCF Québec Meetup du 16 Novembre 2023
CNCF Québec Meetup du 16 Novembre 2023CNCF Québec Meetup du 16 Novembre 2023
CNCF Québec Meetup du 16 Novembre 2023Anthony Dahanne
 
Buildpacks: the other way to build container images
Buildpacks: the other way to build container imagesBuildpacks: the other way to build container images
Buildpacks: the other way to build container imagesAnthony Dahanne
 
Tu changes d'emploi - retour d'experience d'un développeur
Tu changes d'emploi - retour d'experience d'un développeurTu changes d'emploi - retour d'experience d'un développeur
Tu changes d'emploi - retour d'experience d'un développeurAnthony Dahanne
 
Java applications containerized and deployed
Java applications containerized and deployedJava applications containerized and deployed
Java applications containerized and deployedAnthony Dahanne
 
Contribuer à la traduction française de kubernetes
Contribuer à la traduction française de kubernetesContribuer à la traduction française de kubernetes
Contribuer à la traduction française de kubernetesAnthony Dahanne
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Anthony Dahanne
 
Kubernetes Java Operator
Kubernetes Java OperatorKubernetes Java Operator
Kubernetes Java OperatorAnthony Dahanne
 
Caching in applications still matters
Caching in applications still mattersCaching in applications still matters
Caching in applications still mattersAnthony Dahanne
 
Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018Anthony Dahanne
 
Kubernetes for Java Developers
Kubernetes for Java DevelopersKubernetes for Java Developers
Kubernetes for Java DevelopersAnthony Dahanne
 
Terracotta Ehcache : Simpler, faster, distributed
Terracotta Ehcache : Simpler, faster, distributedTerracotta Ehcache : Simpler, faster, distributed
Terracotta Ehcache : Simpler, faster, distributedAnthony Dahanne
 
Docker and java, at Montréal JUG
Docker and java, at Montréal JUGDocker and java, at Montréal JUG
Docker and java, at Montréal JUGAnthony Dahanne
 
Writing a Jenkins / Hudson plugin
Writing a Jenkins / Hudson pluginWriting a Jenkins / Hudson plugin
Writing a Jenkins / Hudson pluginAnthony Dahanne
 
Confoo2013 make your java-app rest enabled
Confoo2013 make your java-app rest enabledConfoo2013 make your java-app rest enabled
Confoo2013 make your java-app rest enabledAnthony Dahanne
 

Plus de Anthony Dahanne (18)

Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024
 
No more Dockerfiles? Buildpacks to help you ship your image!
No more Dockerfiles? Buildpacks to help you ship your image!No more Dockerfiles? Buildpacks to help you ship your image!
No more Dockerfiles? Buildpacks to help you ship your image!
 
CNCF Québec Meetup du 16 Novembre 2023
CNCF Québec Meetup du 16 Novembre 2023CNCF Québec Meetup du 16 Novembre 2023
CNCF Québec Meetup du 16 Novembre 2023
 
Buildpacks: the other way to build container images
Buildpacks: the other way to build container imagesBuildpacks: the other way to build container images
Buildpacks: the other way to build container images
 
Tu changes d'emploi - retour d'experience d'un développeur
Tu changes d'emploi - retour d'experience d'un développeurTu changes d'emploi - retour d'experience d'un développeur
Tu changes d'emploi - retour d'experience d'un développeur
 
Java applications containerized and deployed
Java applications containerized and deployedJava applications containerized and deployed
Java applications containerized and deployed
 
Contribuer à la traduction française de kubernetes
Contribuer à la traduction française de kubernetesContribuer à la traduction française de kubernetes
Contribuer à la traduction française de kubernetes
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !
 
Kubernetes Java Operator
Kubernetes Java OperatorKubernetes Java Operator
Kubernetes Java Operator
 
Caching in applications still matters
Caching in applications still mattersCaching in applications still matters
Caching in applications still matters
 
Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018
 
Kubernetes for Java Developers
Kubernetes for Java DevelopersKubernetes for Java Developers
Kubernetes for Java Developers
 
Docker and java
Docker and javaDocker and java
Docker and java
 
Terracotta Ehcache : Simpler, faster, distributed
Terracotta Ehcache : Simpler, faster, distributedTerracotta Ehcache : Simpler, faster, distributed
Terracotta Ehcache : Simpler, faster, distributed
 
Docker and java, at Montréal JUG
Docker and java, at Montréal JUGDocker and java, at Montréal JUG
Docker and java, at Montréal JUG
 
Writing a Jenkins / Hudson plugin
Writing a Jenkins / Hudson pluginWriting a Jenkins / Hudson plugin
Writing a Jenkins / Hudson plugin
 
Confoo2013 make your java-app rest enabled
Confoo2013 make your java-app rest enabledConfoo2013 make your java-app rest enabled
Confoo2013 make your java-app rest enabled
 
Asynctasks
AsynctasksAsynctasks
Asynctasks
 

Dernier

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 

Dernier (20)

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 

Ci for-android-apps

  • 1. 29/2/2012 Continuous Integration for Android Apps Anthony Dahanne, Eng. @anthonydahanne http://blog.dahanne.net
  • 2. @anthonydahanne 2 Continuous Integration for Android Apps Getting to know each other ... Work @compuware on a APM software based on OSGi and Equinox Develop an open source app on Android, ReGalAndroid Work on Continuous Integration (contribute to tools such as Maven Tycho, m2e-android)
  • 3. @anthonydahanne 3 Continuous Integration for Android Apps Continuous Integration for Android Apps A gentle introduction to Continuous Integration Building an Android app Testing an Android App Setting up a CI tool for Android development Going further than CI...
  • 4. @anthonydahanne 4 Continuous Integration for Android Apps A gentle introduction to Continuous Integration (CI)
  • 5. @anthonydahanne 5 Continuous Integration for Android Apps A gentle introduction to CI : what is it ? “the practice of frequently integrating one's new or changed code with the existing code repository” Wikipedia Each code change triggers a new build of the software Each build should be working (not broken) CI jobs occur on dedicated machines running CI tools such as Hudson/Jenkins/CruiseControl/Bamboo/TravisCI
  • 6. @anthonydahanne 6 Continuous Integration for Android Apps A gentle introduction to CI : benefits ? Coding within a team, makes sure no one commits broken code makes it easy to get the latest good build And more generally Eases the distribution of your software Shows the quality and robustness of your code
  • 7. @anthonydahanne 7 Continuous Integration for Android Apps Building an Android app
  • 8. @anthonydahanne 8 Continuous Integration for Android Apps Building an Android app
  • 9. @anthonydahanne 9 Continuous Integration for Android Apps Building an Android app
  • 10. @anthonydahanne 10 Continuous Integration for Android Apps Building an Android app : outside the IDE ADT exists for each major platform (Win, Linux, Mac) The IDE integration is only (officially) provided for Eclipse For Continuous Integration, we want to : Build outside the IDE, Build on the command line, so that a CI tool can run the build
  • 11. @anthonydahanne 11 Continuous Integration for Android Apps Building an Android app : the choices In the Java world, the main build automation tools are Ant and Maven (equivalent of make in the C world) Apache Ant Appeared in 2000 Very versatile Still very popular Apache Maven Convention over configuration Build lifecycle Dependencies management
  • 12. @anthonydahanne 12 Continuous Integration for Android Apps Building an Android app : with Ant Ant is the official building tool chosen by the ADT team The Ant script can be generated and used easily from an Android project : > android update project --path ./ Updated local.properties Added file ./build.xml Updated file ./proguard.cfg > ant debug install […] BUILD SUCCESSFUL Demo : generate an ant script to build your project
  • 13. @anthonydahanne 13 Continuous Integration for Android Apps Building an Android app : with Maven Maven privileges “convention over configuration” It is extensible via plugins (eg : android-maven-plugin !) Project dependencies are fetched and cached It provides a default execution lifecycle (you can bound a plugin execution to each phase of the lifecycle)
  • 14. @anthonydahanne 14 Continuous Integration for Android Apps Building an Android app : with Maven compilerplugin compile surefire plugin test validate compile test package integration-test verify install deploy deploy plugin deploy The“default”lifecycle This schema is taken from Fabrizio Giudici “Building Android Apps with Maven” slides
  • 15. @anthonydahanne 15 Continuous Integration for Android Apps Building an Android app : with Maven 2 ways to get started with a Maven enabled Android project : Start from scratch with android archetypes : Copy and adapt an existing pom.xml > mvn archetype:generate -DarchetypeArtifactId=android-quickstart -DarchetypeGroupId=de.akquinet.android.archetypes -DarchetypeVersion=1.0.7 -DgroupId=your.company -DartifactId=my-android-application > cd my-android-application > mvn install android:deploy android:run Demo : generate a Maven pom to build your project
  • 16. @anthonydahanne 16 Continuous Integration for Android Apps Building an Android app : with Maven commons-gallery ReGalAndroid app g2-java-client g3-java-client jiwigo-ws-api commons-io httpclient json httpclient httpmime commons-lang httpcore commons-logging commons-codec (transitive) dependencies
  • 17. @anthonydahanne 17 Continuous Integration for Android Apps Building an Android app : which one to choose ? The Ant script Is generated by ADT but Does not deal with dependencies (must copy to lib/) And is not easily extensible The Android Maven Plugin Covers all android specific build steps (proguard, etc...) Is integrated in the Eclipse IDE (thanks to m2e-android) Leverages existing Maven plugins (deploy, replace,etc...)
  • 18. @anthonydahanne 18 Continuous Integration for Android Apps Testing an Android app
  • 19. @anthonydahanne 19 Continuous Integration for Android Apps Testing an Android app Outside an emulator : Externalize your logic in plain jars Use an “Android Mocker” (robolectric) Inside an emulator Integration testing : tests run in a real device (robotium helps !)
  • 20. @anthonydahanne 20 Continuous Integration for Android Apps Testing an Android App ReGalAndroid app ReGalAndroid Integration tests 1. Install the app 2. Install the test app 3. run the app and run the test app Demo : running ReGalAndroid integration tests
  • 21. @anthonydahanne 21 Continuous Integration for Android Apps Setting up a CI tool for Android development
  • 22. @anthonydahanne 22 Continuous Integration for Android Apps Setting up a CI tool As long as the CI tool supports Maven it should work Environment must be set up PATH + JAVA_HOME, M2_HOME, ANDROID_HOME set Download the SDK and : > android update sdk --no-ui --obsolete –force (be careful >2GB as of January '12) > android update sdk --no-ui -t platform –force (just the Android platforms, no samples, no addons, no extras...) > android update sdk --no-ui -t platform-tools –force (Android platform-tools : aadt, adb, etc...) > android create avd -n 23 -t 9 -c 16M -b armeabi (to create an AVD/Emulator)
  • 23. @anthonydahanne 23 Continuous Integration for Android Apps Setting up a CI tool : case of a server (not GUI) Android Emulator Is needed for the integration tests But needs an X server ! Hudson/Jenkins Xvnc plugin to the rescue ! Or, even better, Hudson/Jenkins Android Emulator PluginDemo : a Jenkins job building an android app
  • 24. @anthonydahanne 24 Continuous Integration for Android Apps Going further than Continuous Integration
  • 25. @anthonydahanne 25 Continuous Integration for Android Apps Going further than CI : continuous quality control At each build, check : The tests run Code coverage of the tests Quality metrics of the tests, with Checkstyle, Findbugs, PMD /CPD Sonar does it all ! Quality dashboard of your projects Provides : timeline, rules, diagrams, high level views, etc.
  • 26. @anthonydahanne 26 Continuous Integration for Android Apps Going further than CI : continuous deployment At each build (or milestone / nightly builds) Deploy to a an archive repository (such as Nexus) Use some tooling to push to devices ?
  • 27. @anthonydahanne 27 Continuous Integration for Android Apps Thank you … Now please vote and react on https://joind.in/6032 ! Art The template used for this presentation was the LibreOffice Presentation Template 1.0 The Android pictures belong to Google http://tools.android.com/overview Tools, documentation, useful blogs for Android development and CI Documentation on the Android Maven Plugin can be found reading the Maven Reference Book Updating Android SDK from the command line Manfred Moser's blog Using Android Maven Artifacts See a device screen on your computer : Droid@Screen Use Hudson/Jenkins or try TravisCI out, for CI Sonar, to check on your code quality , and Nexus as an artifact repository manager

Notes de l'éditeur

  1. Code compiles Tests pass Packages build (jar, apk, etc..) See this as a Cron table From wikipedia : Advantages when unit tests fail or a bug emerges, developers might revert the codebase to a bug-free state, without wasting time debugging developers detect and fix integration problems continuously - avoiding last-minute chaos at release dates, (when everyone tries to check in their slightly incompatible versions). early warning of broken/incompatible code early warning of conflicting changes immediate unit testing of all changes constant availability of a "current" build for testing, demo, or release purposes immediate feedback to developers on the quality, functionality, or system-wide impact of code they are writing frequent code check-in pushes developers to create modular, less complex code[citation needed] metrics generated from automated testing and CI (such as metrics for code coverage, code complexity, and features complete) focus developers on developing functional, quality code, and help develop momentum in a team[citation needed] Disadvantages initial setup time required well-developed test-suite required to achieve automated testing advantages hardware costs for build machines can be significant Many teams using CI report that the advantages of CI well outweigh the disadvantages.[9] The effect of finding and fixing integration bugs early in the development process saves both time and money over the lifespan of a project.
  2. Hint ! > ant -p To list all available targets
  3. Hint ! > mvn help:describe -Dplugin=android to list all availlable goals
  4. Hint ! Use : > echo no | android create avd -n 23 -t 9 -c 16M -b armeabi not to be promped to create a hardware profile !