SlideShare a Scribd company logo
1 of 25
Download to read offline
Continuous Integration (CI)
with Maven
for Android applications
Hugo Josefson @ GTUG Malmö 2011
Agenda
● What's the problem?
– Dependency management
– Developer /
Build server mismatch
– Running tests
● Maven & CI
– Dependency management
– Developer /
Build server mismatch
– Running tests
● DEMO!
– How to set up Android apps for Maven
– How to set up Android tests for Maven
– How to set up Continuous Integration
What's the problem?
What's the problem?
- Dependency management
• External jars
• Hunt down the jars
• Where to store them? (svn/git? non-optimal!)
• What version was this jar?
• What version of other dependency jars does it work with?
– all handled manually
What's the problem?
- Dependency management
• Inter-project dependencies
• common library jar
– our-common-lib.jar
• several apk projects depend on it
– MyApp1.apk
– MyApp2.apk
What's the problem?
- Developer / Build server mismatch
• Script vs IDE for building
– Is the binary built the same way across
developers and build servers?
• Script vs IDE for testing
– Is the binary tested the same way across
developers and build servers?
What's the problem?
- Running tests
• Common excuses
– "I don't have time for tests before commit!"
– "I can't be bothered with tests before commit!"
– “I forgot...”
• Regressions creep in...
Maven
What is Maven?
• A build tool (and more: bit.ly/whatIsMaven)
• Default directory structure – overridable
• Plugins
Maven as Build Tool
• Tell Maven:
– My project is a jar / war / apk / ...
– I need library jar commons-lang:2.5
• Maven knows how to build that
• Maven knows how to fetch libraries
• (No need to specify directories,
nor handle library jars)
Maven
Default Directory Structure
Maven Plugins
• Built-in for core functionality
– Building jar
– Building war
– JavaDoc
– Running Tests
– … lots more
• Extra for e.g. building / testing / deploying apk
– maven-android-plugin
Maven vs
Dependency management
• External jars Dependency declaration→
<dependency>
<groupId>commons-lang</groupId>
<artifactid>commons-lang</artifactId>
<version>2.5</version>
</dependency>
Maven vs
Dependency management
• Inter-project dependencies Dep. declaration→
– Example: morse-lib by Manfred Moser
Maven vs
Developer / Build server mismatch
• Solved when both use same build and test tool
– Build server can use Maven
– Developer can use Maven
– Maven builds and runs tests in one go
– Reproducible Same build result→
DEMO TIME!
How to set up
Android apps for Maven
[DEMO]
How to set up
Android tests for Maven
[DEMO]
How to set up
Continuous Integration
[DEMO]
Jenkins + Android SDK
Android Emulator Plugin
Maven project
Maven Android resources
Getting Started + discussion group:
http://code.google.com/p/maven-android-plugin
Google: maven android
Questions?
Extra stuff
(if time allows)
Robotium
• Write UI tests for Android easily with Robotium
– www.robotium.org
– Standalone jar (Apache License 2)
– Makes it easier to write instrumentation tests
– Handles all the hard stuff:
– Toasts, Context menus, Timing issues,
following current Activity...
Robotium, cont'd...
• Write UI tests for Android easily with Robotium
– www.robotium.org
– Use normal instrumentation test class, e.g.
ActivityInstrumentationTestCase2
– Some Maven-enabled robotium-samples
git clone --recursive 
git://github.com/jayway/robotium-samples.git
Multi-module projects
• Share code & resources between Android apps
– Share code + Java resources
Dependency to jar→
– Share Android resources
Dependency to apklib→
» ApkLib on maven-android-plugin wiki
» libraryprojects/ in Samples (beta)
Continuous Integration with Maven for Android apps

More Related Content

What's hot

Let’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkinsLet’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkinsTomohide Kakeya
 
Continuous integration & Continuous Delivery @DeVz
Continuous integration & Continuous Delivery @DeVzContinuous integration & Continuous Delivery @DeVz
Continuous integration & Continuous Delivery @DeVzDenis Ristic
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous IntegrationJoseph Wang
 
CI and CD with Jenkins
CI and CD with JenkinsCI and CD with Jenkins
CI and CD with JenkinsMartin Málek
 
Managing Jenkins with Jenkins (Jenkins User Conference Palo Alto, 2013)
Managing Jenkins with Jenkins (Jenkins User Conference Palo Alto, 2013)Managing Jenkins with Jenkins (Jenkins User Conference Palo Alto, 2013)
Managing Jenkins with Jenkins (Jenkins User Conference Palo Alto, 2013)Gareth Bowles
 
Continuous delivery with open source tools
Continuous delivery with open source toolsContinuous delivery with open source tools
Continuous delivery with open source toolsSebastian Helzle
 
Dev ops for mobile apps at microsoft teams
Dev ops for mobile apps at microsoft teamsDev ops for mobile apps at microsoft teams
Dev ops for mobile apps at microsoft teamsMahesh Arali
 
Make It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version ControlMake It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version Controlindiver
 
Meetup React Sanca - 29/11/18 - React Testing
Meetup React Sanca - 29/11/18 - React TestingMeetup React Sanca - 29/11/18 - React Testing
Meetup React Sanca - 29/11/18 - React TestingAugusto Lazaro
 
Cypress report
Cypress reportCypress report
Cypress reportAdarsh
 
Pipeline as code using Jenkins -Ministry of Testing
Pipeline as code using Jenkins -Ministry of TestingPipeline as code using Jenkins -Ministry of Testing
Pipeline as code using Jenkins -Ministry of TestingSwapnil Jadhav
 
TDD on OSGi, in practice.
TDD on OSGi, in practice.TDD on OSGi, in practice.
TDD on OSGi, in practice.Elian, I.
 
Continuous Integration and PHP
Continuous Integration and PHPContinuous Integration and PHP
Continuous Integration and PHPArno Schneider
 
Ice breaker with dev ops
Ice breaker with dev opsIce breaker with dev ops
Ice breaker with dev opsMukta Aphale
 
Testing as a container
Testing as a containerTesting as a container
Testing as a containerIrfan Ahmad
 

What's hot (20)

Git essentials
Git essentialsGit essentials
Git essentials
 
Let’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkinsLet’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkins
 
Continuous integration & Continuous Delivery @DeVz
Continuous integration & Continuous Delivery @DeVzContinuous integration & Continuous Delivery @DeVz
Continuous integration & Continuous Delivery @DeVz
 
Continuous operations in AWS
Continuous operations in AWSContinuous operations in AWS
Continuous operations in AWS
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
CI and CD with Jenkins
CI and CD with JenkinsCI and CD with Jenkins
CI and CD with Jenkins
 
Jenkins presentation
Jenkins presentationJenkins presentation
Jenkins presentation
 
Managing Jenkins with Jenkins (Jenkins User Conference Palo Alto, 2013)
Managing Jenkins with Jenkins (Jenkins User Conference Palo Alto, 2013)Managing Jenkins with Jenkins (Jenkins User Conference Palo Alto, 2013)
Managing Jenkins with Jenkins (Jenkins User Conference Palo Alto, 2013)
 
Continuous delivery with open source tools
Continuous delivery with open source toolsContinuous delivery with open source tools
Continuous delivery with open source tools
 
Jenkins
JenkinsJenkins
Jenkins
 
Dev ops for mobile apps at microsoft teams
Dev ops for mobile apps at microsoft teamsDev ops for mobile apps at microsoft teams
Dev ops for mobile apps at microsoft teams
 
Make It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version ControlMake It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version Control
 
Meetup React Sanca - 29/11/18 - React Testing
Meetup React Sanca - 29/11/18 - React TestingMeetup React Sanca - 29/11/18 - React Testing
Meetup React Sanca - 29/11/18 - React Testing
 
Version Controlling
Version ControllingVersion Controlling
Version Controlling
 
Cypress report
Cypress reportCypress report
Cypress report
 
Pipeline as code using Jenkins -Ministry of Testing
Pipeline as code using Jenkins -Ministry of TestingPipeline as code using Jenkins -Ministry of Testing
Pipeline as code using Jenkins -Ministry of Testing
 
TDD on OSGi, in practice.
TDD on OSGi, in practice.TDD on OSGi, in practice.
TDD on OSGi, in practice.
 
Continuous Integration and PHP
Continuous Integration and PHPContinuous Integration and PHP
Continuous Integration and PHP
 
Ice breaker with dev ops
Ice breaker with dev opsIce breaker with dev ops
Ice breaker with dev ops
 
Testing as a container
Testing as a containerTesting as a container
Testing as a container
 

Viewers also liked

Owasp A9 USING KNOWN VULNERABLE COMPONENTS IT 6873 presentation
Owasp A9 USING KNOWN VULNERABLE COMPONENTS   IT 6873 presentationOwasp A9 USING KNOWN VULNERABLE COMPONENTS   IT 6873 presentation
Owasp A9 USING KNOWN VULNERABLE COMPONENTS IT 6873 presentationDerrick Hunter
 
2014 11-06-sonarqube-asfws-141110031042-conversion-gate01
2014 11-06-sonarqube-asfws-141110031042-conversion-gate012014 11-06-sonarqube-asfws-141110031042-conversion-gate01
2014 11-06-sonarqube-asfws-141110031042-conversion-gate01Cyber Security Alliance
 
Managing Security in External Software Dependencies
Managing Security in External Software DependenciesManaging Security in External Software Dependencies
Managing Security in External Software Dependenciesthariyarox
 
Continuous Security - TCCC
Continuous Security - TCCCContinuous Security - TCCC
Continuous Security - TCCCWendy Istvanick
 
12 Tips to Become a more Professional Tester
12 Tips to Become a more Professional Tester12 Tips to Become a more Professional Tester
12 Tips to Become a more Professional TesterPractiTest
 
Building frameworks over Selenium
Building frameworks over SeleniumBuilding frameworks over Selenium
Building frameworks over SeleniumCristian COȚOI
 
Hiding in Plain Sight: The Danger of Known Vulnerabilities
Hiding in Plain Sight: The Danger of Known VulnerabilitiesHiding in Plain Sight: The Danger of Known Vulnerabilities
Hiding in Plain Sight: The Danger of Known VulnerabilitiesImperva
 
Live 2014 Survey Results: Open Source Development and Application Security Su...
Live 2014 Survey Results: Open Source Development and Application Security Su...Live 2014 Survey Results: Open Source Development and Application Security Su...
Live 2014 Survey Results: Open Source Development and Application Security Su...Sonatype
 
Being a professional software tester
Being a professional software testerBeing a professional software tester
Being a professional software testerAnton Keks
 
Abusing, Exploiting and Pwning with Firefox Add-ons: OWASP Appsec 2013 Presen...
Abusing, Exploiting and Pwning with Firefox Add-ons: OWASP Appsec 2013 Presen...Abusing, Exploiting and Pwning with Firefox Add-ons: OWASP Appsec 2013 Presen...
Abusing, Exploiting and Pwning with Firefox Add-ons: OWASP Appsec 2013 Presen...Ajin Abraham
 
[Poland] SecOps live cooking with OWASP appsec tools
[Poland] SecOps live cooking with OWASP appsec tools[Poland] SecOps live cooking with OWASP appsec tools
[Poland] SecOps live cooking with OWASP appsec toolsOWASP EEE
 
Stc 2016 regional-round-iot testing in agile.
Stc 2016 regional-round-iot testing in agile.Stc 2016 regional-round-iot testing in agile.
Stc 2016 regional-round-iot testing in agile.Archana Krushnan
 
DevOpsCon 2016 - Continuous Security Testing - Stephan Kaps
DevOpsCon 2016 - Continuous Security Testing - Stephan KapsDevOpsCon 2016 - Continuous Security Testing - Stephan Kaps
DevOpsCon 2016 - Continuous Security Testing - Stephan KapsStephan Kaps
 
Simplify Dev with Complicated Security Tools
Simplify Dev with Complicated Security ToolsSimplify Dev with Complicated Security Tools
Simplify Dev with Complicated Security ToolsKevin Fealey
 
Les principales failles de sécurité des applications web actuelles
Les principales failles de sécurité des applications web actuellesLes principales failles de sécurité des applications web actuelles
Les principales failles de sécurité des applications web actuellesBee_Ware
 
Cross-browser testing in the real world
Cross-browser testing in the real worldCross-browser testing in the real world
Cross-browser testing in the real worldMartin Kleppmann
 

Viewers also liked (20)

27 jan 2012[1]
27 jan 2012[1]27 jan 2012[1]
27 jan 2012[1]
 
Owasp A9 USING KNOWN VULNERABLE COMPONENTS IT 6873 presentation
Owasp A9 USING KNOWN VULNERABLE COMPONENTS   IT 6873 presentationOwasp A9 USING KNOWN VULNERABLE COMPONENTS   IT 6873 presentation
Owasp A9 USING KNOWN VULNERABLE COMPONENTS IT 6873 presentation
 
2014 11-06-sonarqube-asfws-141110031042-conversion-gate01
2014 11-06-sonarqube-asfws-141110031042-conversion-gate012014 11-06-sonarqube-asfws-141110031042-conversion-gate01
2014 11-06-sonarqube-asfws-141110031042-conversion-gate01
 
Managing Security in External Software Dependencies
Managing Security in External Software DependenciesManaging Security in External Software Dependencies
Managing Security in External Software Dependencies
 
Continuous Security - TCCC
Continuous Security - TCCCContinuous Security - TCCC
Continuous Security - TCCC
 
12 Tips to Become a more Professional Tester
12 Tips to Become a more Professional Tester12 Tips to Become a more Professional Tester
12 Tips to Become a more Professional Tester
 
Building frameworks over Selenium
Building frameworks over SeleniumBuilding frameworks over Selenium
Building frameworks over Selenium
 
Dependency check
Dependency checkDependency check
Dependency check
 
Hiding in Plain Sight: The Danger of Known Vulnerabilities
Hiding in Plain Sight: The Danger of Known VulnerabilitiesHiding in Plain Sight: The Danger of Known Vulnerabilities
Hiding in Plain Sight: The Danger of Known Vulnerabilities
 
Live 2014 Survey Results: Open Source Development and Application Security Su...
Live 2014 Survey Results: Open Source Development and Application Security Su...Live 2014 Survey Results: Open Source Development and Application Security Su...
Live 2014 Survey Results: Open Source Development and Application Security Su...
 
Managing third party libraries
Managing third party librariesManaging third party libraries
Managing third party libraries
 
Being a professional software tester
Being a professional software testerBeing a professional software tester
Being a professional software tester
 
Abusing, Exploiting and Pwning with Firefox Add-ons: OWASP Appsec 2013 Presen...
Abusing, Exploiting and Pwning with Firefox Add-ons: OWASP Appsec 2013 Presen...Abusing, Exploiting and Pwning with Firefox Add-ons: OWASP Appsec 2013 Presen...
Abusing, Exploiting and Pwning with Firefox Add-ons: OWASP Appsec 2013 Presen...
 
[Poland] SecOps live cooking with OWASP appsec tools
[Poland] SecOps live cooking with OWASP appsec tools[Poland] SecOps live cooking with OWASP appsec tools
[Poland] SecOps live cooking with OWASP appsec tools
 
News Bytes - December 2015
News Bytes - December 2015News Bytes - December 2015
News Bytes - December 2015
 
Stc 2016 regional-round-iot testing in agile.
Stc 2016 regional-round-iot testing in agile.Stc 2016 regional-round-iot testing in agile.
Stc 2016 regional-round-iot testing in agile.
 
DevOpsCon 2016 - Continuous Security Testing - Stephan Kaps
DevOpsCon 2016 - Continuous Security Testing - Stephan KapsDevOpsCon 2016 - Continuous Security Testing - Stephan Kaps
DevOpsCon 2016 - Continuous Security Testing - Stephan Kaps
 
Simplify Dev with Complicated Security Tools
Simplify Dev with Complicated Security ToolsSimplify Dev with Complicated Security Tools
Simplify Dev with Complicated Security Tools
 
Les principales failles de sécurité des applications web actuelles
Les principales failles de sécurité des applications web actuellesLes principales failles de sécurité des applications web actuelles
Les principales failles de sécurité des applications web actuelles
 
Cross-browser testing in the real world
Cross-browser testing in the real worldCross-browser testing in the real world
Cross-browser testing in the real world
 

Similar to Continuous Integration with Maven for Android apps

DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...Simplilearn
 
Ci jenkins maven svn
Ci jenkins maven svnCi jenkins maven svn
Ci jenkins maven svnAnkur Goyal
 
S/W Design and Modularity using Maven
S/W Design and Modularity using MavenS/W Design and Modularity using Maven
S/W Design and Modularity using MavenScheidt & Bachmann
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulMert Çalışkan
 
SE2018_Lec-22_-Continuous-Integration-Tools
SE2018_Lec-22_-Continuous-Integration-ToolsSE2018_Lec-22_-Continuous-Integration-Tools
SE2018_Lec-22_-Continuous-Integration-ToolsAmr E. Mohamed
 
Introduction to Maven for beginners and DevOps
Introduction to Maven for beginners and DevOpsIntroduction to Maven for beginners and DevOps
Introduction to Maven for beginners and DevOpsSISTechnologies
 
Java is evolving rapidly: Maven helps you staying on track
Java is evolving rapidly:  Maven helps you staying on trackJava is evolving rapidly:  Maven helps you staying on track
Java is evolving rapidly: Maven helps you staying on trackArnaud Héritier
 
From Ant to Maven to Gradle a tale of CI tools for JVM
From Ant to Maven to Gradle a tale of CI tools for JVMFrom Ant to Maven to Gradle a tale of CI tools for JVM
From Ant to Maven to Gradle a tale of CI tools for JVMBucharest Java User Group
 
(Re)-Introduction to Maven
(Re)-Introduction to Maven(Re)-Introduction to Maven
(Re)-Introduction to MavenEric Wyles
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topicGourav Varma
 
software technology benchmarking
software  technology benchmarkingsoftware  technology benchmarking
software technology benchmarkingMallikarjuna G D
 
Apache Maven - eXo TN presentation
Apache Maven - eXo TN presentationApache Maven - eXo TN presentation
Apache Maven - eXo TN presentationArnaud Héritier
 

Similar to Continuous Integration with Maven for Android apps (20)

Build tool
Build toolBuild tool
Build tool
 
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
 
Ci jenkins maven svn
Ci jenkins maven svnCi jenkins maven svn
Ci jenkins maven svn
 
S/W Design and Modularity using Maven
S/W Design and Modularity using MavenS/W Design and Modularity using Maven
S/W Design and Modularity using Maven
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest Istanbul
 
SE2018_Lec-22_-Continuous-Integration-Tools
SE2018_Lec-22_-Continuous-Integration-ToolsSE2018_Lec-22_-Continuous-Integration-Tools
SE2018_Lec-22_-Continuous-Integration-Tools
 
Introduction to Maven for beginners and DevOps
Introduction to Maven for beginners and DevOpsIntroduction to Maven for beginners and DevOps
Introduction to Maven for beginners and DevOps
 
Java is evolving rapidly: Maven helps you staying on track
Java is evolving rapidly:  Maven helps you staying on trackJava is evolving rapidly:  Maven helps you staying on track
Java is evolving rapidly: Maven helps you staying on track
 
From Ant to Maven to Gradle a tale of CI tools for JVM
From Ant to Maven to Gradle a tale of CI tools for JVMFrom Ant to Maven to Gradle a tale of CI tools for JVM
From Ant to Maven to Gradle a tale of CI tools for JVM
 
Mavennotes.pdf
Mavennotes.pdfMavennotes.pdf
Mavennotes.pdf
 
(Re)-Introduction to Maven
(Re)-Introduction to Maven(Re)-Introduction to Maven
(Re)-Introduction to Maven
 
Vagrant to-aws-flow
Vagrant to-aws-flowVagrant to-aws-flow
Vagrant to-aws-flow
 
Devops
DevopsDevops
Devops
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
 
What is maven
What is mavenWhat is maven
What is maven
 
software technology benchmarking
software  technology benchmarkingsoftware  technology benchmarking
software technology benchmarking
 
Apache Maven - eXo TN presentation
Apache Maven - eXo TN presentationApache Maven - eXo TN presentation
Apache Maven - eXo TN presentation
 
4 maven junit
4 maven junit4 maven junit
4 maven junit
 
Test automation proposal
Test automation proposalTest automation proposal
Test automation proposal
 
Manen Ant SVN
Manen Ant SVNManen Ant SVN
Manen Ant SVN
 

Recently uploaded

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Recently uploaded (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Continuous Integration with Maven for Android apps

  • 1. Continuous Integration (CI) with Maven for Android applications Hugo Josefson @ GTUG Malmö 2011
  • 2. Agenda ● What's the problem? – Dependency management – Developer / Build server mismatch – Running tests ● Maven & CI – Dependency management – Developer / Build server mismatch – Running tests ● DEMO! – How to set up Android apps for Maven – How to set up Android tests for Maven – How to set up Continuous Integration
  • 4. What's the problem? - Dependency management • External jars • Hunt down the jars • Where to store them? (svn/git? non-optimal!) • What version was this jar? • What version of other dependency jars does it work with? – all handled manually
  • 5. What's the problem? - Dependency management • Inter-project dependencies • common library jar – our-common-lib.jar • several apk projects depend on it – MyApp1.apk – MyApp2.apk
  • 6. What's the problem? - Developer / Build server mismatch • Script vs IDE for building – Is the binary built the same way across developers and build servers? • Script vs IDE for testing – Is the binary tested the same way across developers and build servers?
  • 7. What's the problem? - Running tests • Common excuses – "I don't have time for tests before commit!" – "I can't be bothered with tests before commit!" – “I forgot...” • Regressions creep in...
  • 9. What is Maven? • A build tool (and more: bit.ly/whatIsMaven) • Default directory structure – overridable • Plugins
  • 10. Maven as Build Tool • Tell Maven: – My project is a jar / war / apk / ... – I need library jar commons-lang:2.5 • Maven knows how to build that • Maven knows how to fetch libraries • (No need to specify directories, nor handle library jars)
  • 12. Maven Plugins • Built-in for core functionality – Building jar – Building war – JavaDoc – Running Tests – … lots more • Extra for e.g. building / testing / deploying apk – maven-android-plugin
  • 13. Maven vs Dependency management • External jars Dependency declaration→ <dependency> <groupId>commons-lang</groupId> <artifactid>commons-lang</artifactId> <version>2.5</version> </dependency>
  • 14. Maven vs Dependency management • Inter-project dependencies Dep. declaration→ – Example: morse-lib by Manfred Moser
  • 15. Maven vs Developer / Build server mismatch • Solved when both use same build and test tool – Build server can use Maven – Developer can use Maven – Maven builds and runs tests in one go – Reproducible Same build result→
  • 17. How to set up Android apps for Maven [DEMO]
  • 18. How to set up Android tests for Maven [DEMO]
  • 19. How to set up Continuous Integration [DEMO] Jenkins + Android SDK Android Emulator Plugin Maven project
  • 20. Maven Android resources Getting Started + discussion group: http://code.google.com/p/maven-android-plugin Google: maven android Questions?
  • 22. Robotium • Write UI tests for Android easily with Robotium – www.robotium.org – Standalone jar (Apache License 2) – Makes it easier to write instrumentation tests – Handles all the hard stuff: – Toasts, Context menus, Timing issues, following current Activity...
  • 23. Robotium, cont'd... • Write UI tests for Android easily with Robotium – www.robotium.org – Use normal instrumentation test class, e.g. ActivityInstrumentationTestCase2 – Some Maven-enabled robotium-samples git clone --recursive git://github.com/jayway/robotium-samples.git
  • 24. Multi-module projects • Share code & resources between Android apps – Share code + Java resources Dependency to jar→ – Share Android resources Dependency to apklib→ » ApkLib on maven-android-plugin wiki » libraryprojects/ in Samples (beta)

Editor's Notes

  1. Yes, there are notes for some slides :)
  2. You find+download jars, what are they named? Sometimes/Usually not w/ version numbers. Git/Svn not designed for multi-MB binary blobs. The history becomes heavy. (affects backups for svn,git; clone for git) Where can I find dependency information? Hopefully in “some documentation” on each jar&apos;s website.
  3. How do you keep track of which version of the common lib you are using? (in each of the apk projects)
  4. Customer says: “Doesn&apos;t work!” Developer says: “Works for me!” How do you know what each person is using, if the build server built the app one way and the developer some other way?
  5. Let me show you what Maven and a Continuous Integration server can bring to the table, addressing each of these issues... But first, what is Maven?...
  6. - It&apos;s more than a build tool, because it lets you define the project in terms of /what it is/ rather than defining /all the build steps/ needed to arrive at the output artifact. – You define your project in a project object model (pom file), where you tell Maven what the packaging type of your application is: jar, war, apk. It then knows what build steps are needed to build your project and where your code and resources are located by default.
  7. – You can override the defaults if you want.
  8. – Plugins contain the functionality: built-in core plugins for default things such as compiling a jar, and 3:rd party such as maven-android-plugin for building Android apk:s.
  9. Maven downloads this from a Central OpenSource repository. - cached locally - If what you need is not already there, you can have your own repository where you store 3:rd party jars.
  10. – In this case, the Library is a simple jar project, containing the main functionality. It&apos;s not tied to a particular platform, and is unit-testable. – The App project is an apk, and uses the Library via Maven dependency declaration.