SlideShare a Scribd company logo
1 of 28
Download to read offline
UNDERSTANDING
ANDROID
BUILD
VARIANTS
Donn Felker
@donnfelker
4 Time Android Book Author
Co-Host of Fragmented
Podcast
donnfelker.com | caster.io
BUILD VARIANTS
ALL UP IN YOUR GRILL
Create Flexible
Runtime
Environments
LIKE WHOA
No, for real, what are they?
Build variants allow you to quickly create
different versions of your app from the same
source code. Kinda.
Build variants
facilitate
composability within
the Android build
system.
Yo, wheres the
CODE?!?!
here: github.com/casterio
simple example
Creating a debug package
branch: debug-suffix
Crazy, I know.
Ok, it's not really that impressive.
app-debug.apkmore like lame-debug.apk
lets fix that
branch: change-app-name
WickedCool-debug.apk
Much better.
Moving on ...
Mmm Product Flavors
Free and Pro Versions
Why do I need free
and pro versions?
Some people like to watch their money
Nah, I'm kidding.
Its about exposure
and conversions
We all love free stuff.
If you like it, first
ones on the house.
AKA: Trials (aka: drug dealer model)
Free and Paid
Versions
branch: product-flavors
I know, right?
Ok, maybe just a little
Android Manifest
Values
Update the manifest at build
time with the manifest merger
branch: manifest-placeholders
Release / Debug
Composability
Say what?
Debug only logging/etc
Release only Crashlytics Logging
Custom Resources!
Different layouts,
icons, etc at runtime
branch: custom-resources
There is a lot more,
but that should get
you going in the right
direction.
@donnfelker
thanks

More Related Content

Viewers also liked

20080531 Intro To Dependency Injection & Inversion Of Control
20080531 Intro To Dependency Injection & Inversion Of Control20080531 Intro To Dependency Injection & Inversion Of Control
20080531 Intro To Dependency Injection & Inversion Of Controldonnfelker
 
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersAndroid fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersBoom Shukla
 
Basic android-ppt
Basic android-pptBasic android-ppt
Basic android-pptSrijib Roy
 
Android tutorial ppt
Android tutorial pptAndroid tutorial ppt
Android tutorial pptRehna Renu
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application DevelopmentBenny Skogberg
 
My Top 10 slides on presentations
My Top 10 slides on presentationsMy Top 10 slides on presentations
My Top 10 slides on presentationsAlexei Kapterev
 

Viewers also liked (7)

20080531 Intro To Dependency Injection & Inversion Of Control
20080531 Intro To Dependency Injection & Inversion Of Control20080531 Intro To Dependency Injection & Inversion Of Control
20080531 Intro To Dependency Injection & Inversion Of Control
 
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersAndroid fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginners
 
Basic android-ppt
Basic android-pptBasic android-ppt
Basic android-ppt
 
Android tutorial ppt
Android tutorial pptAndroid tutorial ppt
Android tutorial ppt
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application Development
 
Android seminar ppt
Android seminar pptAndroid seminar ppt
Android seminar ppt
 
My Top 10 slides on presentations
My Top 10 slides on presentationsMy Top 10 slides on presentations
My Top 10 slides on presentations
 

Similar to Understanding Android Build Variants

A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023
A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023
A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023Pedro Vicente
 
Introduction to Cordova
Introduction to CordovaIntroduction to Cordova
Introduction to CordovaRaymond Camden
 
DevOps + MongoDB Realm Serverless Functions = 🤩
DevOps + MongoDB Realm Serverless Functions = 🤩DevOps + MongoDB Realm Serverless Functions = 🤩
DevOps + MongoDB Realm Serverless Functions = 🤩Lauren Hayward Schaefer
 
Ninja Productivity in Android Studio
Ninja Productivity in Android StudioNinja Productivity in Android Studio
Ninja Productivity in Android StudioRamon Ribeiro Rabello
 
Building an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedBuilding an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedWojciech Koszek
 
PhoneGap: a brief history and apologia
PhoneGap: a brief history and apologiaPhoneGap: a brief history and apologia
PhoneGap: a brief history and apologialorinbeer
 
Cordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirstCordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirstRaymond Camden
 
How do I - Use Include Source to debug native code - Trasnscript.pdf
How do I - Use Include Source to debug native code - Trasnscript.pdfHow do I - Use Include Source to debug native code - Trasnscript.pdf
How do I - Use Include Source to debug native code - Trasnscript.pdfShaiAlmog1
 
DevAppLB - PhoneGap Zombie App - Dani Arnaout
DevAppLB - PhoneGap Zombie App - Dani ArnaoutDevAppLB - PhoneGap Zombie App - Dani Arnaout
DevAppLB - PhoneGap Zombie App - Dani ArnaoutDani Arnaout
 
Announcing codepen support for flutter how that works for developers
Announcing codepen support for flutter how that works for developersAnnouncing codepen support for flutter how that works for developers
Announcing codepen support for flutter how that works for developersConcetto Labs
 
Compose Camp Slide.pptx (1).pdf
Compose Camp Slide.pptx (1).pdfCompose Camp Slide.pptx (1).pdf
Compose Camp Slide.pptx (1).pdfAryanKhandelwal35
 
Common Missteps in Cross-Platform Development.pdf
Common Missteps in Cross-Platform Development.pdfCommon Missteps in Cross-Platform Development.pdf
Common Missteps in Cross-Platform Development.pdfPridesys IT Ltd.
 
Android Internals (This is not the droid you’re loking for...)
Android Internals (This is not the droid you’re loking for...)Android Internals (This is not the droid you’re loking for...)
Android Internals (This is not the droid you’re loking for...)Giacomo Bergami
 
Windows storemindcrcaker23rdmarch
Windows storemindcrcaker23rdmarchWindows storemindcrcaker23rdmarch
Windows storemindcrcaker23rdmarchDhananjay Kumar
 

Similar to Understanding Android Build Variants (20)

A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023
A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023
A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023
 
HealthyCodeMay2014
HealthyCodeMay2014HealthyCodeMay2014
HealthyCodeMay2014
 
Intro to Github
Intro to GithubIntro to Github
Intro to Github
 
Introduction to Cordova
Introduction to CordovaIntroduction to Cordova
Introduction to Cordova
 
DevOps + MongoDB Realm Serverless Functions = 🤩
DevOps + MongoDB Realm Serverless Functions = 🤩DevOps + MongoDB Realm Serverless Functions = 🤩
DevOps + MongoDB Realm Serverless Functions = 🤩
 
Ninja Productivity in Android Studio
Ninja Productivity in Android StudioNinja Productivity in Android Studio
Ninja Productivity in Android Studio
 
Summary Of Polycom Cast App
Summary Of Polycom Cast AppSummary Of Polycom Cast App
Summary Of Polycom Cast App
 
Building an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedBuilding an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learned
 
PhoneGap: a brief history and apologia
PhoneGap: a brief history and apologiaPhoneGap: a brief history and apologia
PhoneGap: a brief history and apologia
 
Cordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirstCordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirst
 
How do I - Use Include Source to debug native code - Trasnscript.pdf
How do I - Use Include Source to debug native code - Trasnscript.pdfHow do I - Use Include Source to debug native code - Trasnscript.pdf
How do I - Use Include Source to debug native code - Trasnscript.pdf
 
Mobile development xamarain
Mobile development xamarainMobile development xamarain
Mobile development xamarain
 
DevAppLB - PhoneGap Zombie App - Dani Arnaout
DevAppLB - PhoneGap Zombie App - Dani ArnaoutDevAppLB - PhoneGap Zombie App - Dani Arnaout
DevAppLB - PhoneGap Zombie App - Dani Arnaout
 
DevOps + MongoDB Serverless = 
DevOps + MongoDB Serverless = DevOps + MongoDB Serverless = 
DevOps + MongoDB Serverless = 
 
Announcing codepen support for flutter how that works for developers
Announcing codepen support for flutter how that works for developersAnnouncing codepen support for flutter how that works for developers
Announcing codepen support for flutter how that works for developers
 
Compose Camp Slide.pptx (1).pdf
Compose Camp Slide.pptx (1).pdfCompose Camp Slide.pptx (1).pdf
Compose Camp Slide.pptx (1).pdf
 
A Gradle Story
A Gradle StoryA Gradle Story
A Gradle Story
 
Common Missteps in Cross-Platform Development.pdf
Common Missteps in Cross-Platform Development.pdfCommon Missteps in Cross-Platform Development.pdf
Common Missteps in Cross-Platform Development.pdf
 
Android Internals (This is not the droid you’re loking for...)
Android Internals (This is not the droid you’re loking for...)Android Internals (This is not the droid you’re loking for...)
Android Internals (This is not the droid you’re loking for...)
 
Windows storemindcrcaker23rdmarch
Windows storemindcrcaker23rdmarchWindows storemindcrcaker23rdmarch
Windows storemindcrcaker23rdmarch
 

More from donnfelker

Building More with Less
Building More with LessBuilding More with Less
Building More with Lessdonnfelker
 
Android Bootstrap
Android BootstrapAndroid Bootstrap
Android Bootstrapdonnfelker
 
Building HTTP API's with NodeJS and MongoDB
Building HTTP API's with NodeJS and MongoDBBuilding HTTP API's with NodeJS and MongoDB
Building HTTP API's with NodeJS and MongoDBdonnfelker
 
Whats New in Android
Whats New in AndroidWhats New in Android
Whats New in Androiddonnfelker
 
Android Bootstrap
Android BootstrapAndroid Bootstrap
Android Bootstrapdonnfelker
 
Outsourcing Do's and Don'ts
Outsourcing Do's and Don'tsOutsourcing Do's and Don'ts
Outsourcing Do's and Don'tsdonnfelker
 
Advanced android
Advanced androidAdvanced android
Advanced androiddonnfelker
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Developmentdonnfelker
 

More from donnfelker (8)

Building More with Less
Building More with LessBuilding More with Less
Building More with Less
 
Android Bootstrap
Android BootstrapAndroid Bootstrap
Android Bootstrap
 
Building HTTP API's with NodeJS and MongoDB
Building HTTP API's with NodeJS and MongoDBBuilding HTTP API's with NodeJS and MongoDB
Building HTTP API's with NodeJS and MongoDB
 
Whats New in Android
Whats New in AndroidWhats New in Android
Whats New in Android
 
Android Bootstrap
Android BootstrapAndroid Bootstrap
Android Bootstrap
 
Outsourcing Do's and Don'ts
Outsourcing Do's and Don'tsOutsourcing Do's and Don'ts
Outsourcing Do's and Don'ts
 
Advanced android
Advanced androidAdvanced android
Advanced android
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 

Understanding Android Build Variants