際際滷

際際滷Share a Scribd company logo
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
Understanding Android Build Variants
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
Understanding Android Build Variants
Release / Debug
Composability
Say what?
Debug only logging/etc
Release only Crashlytics Logging
Understanding Android Build Variants
Custom Resources!
Different layouts,
icons, etc at runtime
branch: custom-resources
Understanding Android Build Variants
There is a lot more,
but that should get
you going in the right
direction.
@donnfelker
thanks
Ad

Recommended

Evaluation question 6
Evaluation question 6
jamiehollins
Using Video In Voicethread
Using Video In Voicethread
ellism01
ColdFusion builder 3 making the awesome
ColdFusion builder 3 making the awesome
ColdFusionConference
Question 6. What have you learnt about technologies from the process of const...
Question 6. What have you learnt about technologies from the process of const...
SoSweetSophie
Section 6
Section 6
Cameron Lawrence
Evaluation 6
Evaluation 6
Cameron Lawrence
Evaluation question 6
Evaluation question 6
Callum Mckinlay
Evaluation Question 4
Evaluation Question 4
liam_conlon036
20080531 Intro To Dependency Injection & Inversion Of Control
20080531 Intro To Dependency Injection & Inversion Of Control
donnfelker
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginners
Boom Shukla
Basic android-ppt
Basic android-ppt
Srijib Roy
Android tutorial ppt
Android tutorial ppt
Rehna Renu
Android Application Development
Android Application Development
Benny Skogberg
Android seminar ppt
Android seminar ppt
chakrapani tripathi
My Top 10 slides on presentations
My Top 10 slides on presentations
Alexei Kapterev
Android studio build variants
Android studio build variants
dipo Souza
Android Studio 3 - Dependency-Aware Build Variants and Product Flavors
Android Studio 3 - Dependency-Aware Build Variants and Product Flavors
Stefan Martynkiw
20160915 automation with_gradle
20160915 automation with_gradle
Yuki Nanri
Building android apps with Gradle (GREACH 2015)
Building android apps with Gradle (GREACH 2015)
Ren辿 Gr旦schke
Build Your First Android App Session #1
Build Your First Android App Session #1
Troy Miles
Gradle 101
Gradle 101
Kurt Mbanje
1.2 introduction to scm - what does version number tell us
1.2 introduction to scm - what does version number tell us
Sergii Shmarkatiuk
Building More with Less
Building More with Less
donnfelker
Android Bootstrap
Android Bootstrap
donnfelker
Building HTTP API's with NodeJS and MongoDB
Building HTTP API's with NodeJS and MongoDB
donnfelker
Whats New in Android
Whats New in Android
donnfelker
Android Bootstrap
Android Bootstrap
donnfelker
Outsourcing Do's and Don'ts
Outsourcing Do's and Don'ts
donnfelker
Advanced android
Advanced android
donnfelker
Introduction to Android Development
Introduction to Android Development
donnfelker

More Related Content

Viewers also liked (7)

20080531 Intro To Dependency Injection & Inversion Of Control
20080531 Intro To Dependency Injection & Inversion Of Control
donnfelker
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginners
Boom Shukla
Basic android-ppt
Basic android-ppt
Srijib Roy
Android tutorial ppt
Android tutorial ppt
Rehna Renu
Android Application Development
Android Application Development
Benny Skogberg
Android seminar ppt
Android seminar ppt
chakrapani tripathi
My Top 10 slides on presentations
My Top 10 slides on presentations
Alexei Kapterev
20080531 Intro To Dependency Injection & Inversion Of Control
20080531 Intro To Dependency Injection & Inversion Of Control
donnfelker
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginners
Boom Shukla
Basic android-ppt
Basic android-ppt
Srijib Roy
Android tutorial ppt
Android tutorial ppt
Rehna Renu
Android Application Development
Android Application Development
Benny Skogberg
My Top 10 slides on presentations
My Top 10 slides on presentations
Alexei Kapterev

Similar to Understanding Android Build Variants (7)

Android studio build variants
Android studio build variants
dipo Souza
Android Studio 3 - Dependency-Aware Build Variants and Product Flavors
Android Studio 3 - Dependency-Aware Build Variants and Product Flavors
Stefan Martynkiw
20160915 automation with_gradle
20160915 automation with_gradle
Yuki Nanri
Building android apps with Gradle (GREACH 2015)
Building android apps with Gradle (GREACH 2015)
Ren辿 Gr旦schke
Build Your First Android App Session #1
Build Your First Android App Session #1
Troy Miles
Gradle 101
Gradle 101
Kurt Mbanje
1.2 introduction to scm - what does version number tell us
1.2 introduction to scm - what does version number tell us
Sergii Shmarkatiuk
Android studio build variants
Android studio build variants
dipo Souza
Android Studio 3 - Dependency-Aware Build Variants and Product Flavors
Android Studio 3 - Dependency-Aware Build Variants and Product Flavors
Stefan Martynkiw
20160915 automation with_gradle
20160915 automation with_gradle
Yuki Nanri
Building android apps with Gradle (GREACH 2015)
Building android apps with Gradle (GREACH 2015)
Ren辿 Gr旦schke
Build Your First Android App Session #1
Build Your First Android App Session #1
Troy Miles
1.2 introduction to scm - what does version number tell us
1.2 introduction to scm - what does version number tell us
Sergii Shmarkatiuk
Ad

More from donnfelker (8)

Building More with Less
Building More with Less
donnfelker
Android Bootstrap
Android Bootstrap
donnfelker
Building HTTP API's with NodeJS and MongoDB
Building HTTP API's with NodeJS and MongoDB
donnfelker
Whats New in Android
Whats New in Android
donnfelker
Android Bootstrap
Android Bootstrap
donnfelker
Outsourcing Do's and Don'ts
Outsourcing Do's and Don'ts
donnfelker
Advanced android
Advanced android
donnfelker
Introduction to Android Development
Introduction to Android Development
donnfelker
Building More with Less
Building More with Less
donnfelker
Android Bootstrap
Android Bootstrap
donnfelker
Building HTTP API's with NodeJS and MongoDB
Building HTTP API's with NodeJS and MongoDB
donnfelker
Whats New in Android
Whats New in Android
donnfelker
Android Bootstrap
Android Bootstrap
donnfelker
Outsourcing Do's and Don'ts
Outsourcing Do's and Don'ts
donnfelker
Advanced android
Advanced android
donnfelker
Introduction to Android Development
Introduction to Android Development
donnfelker
Ad

Understanding Android Build Variants