Last active
December 12, 2017 05:25
-
-
Save Elvis10ten/f89adebbf2ef9fad218343e2490262ff to your computer and use it in GitHub Desktop.
Product flavors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// There is a new feature in gradle 3.0.0 called flavorDimension that allows you to combine | |
// different product flavors. We will be using just the "default" dimension | |
flavorDimensions "default" | |
productFlavors { | |
dev { | |
dimension "default" | |
applicationIdSuffix '.dev' // The applicationId now becomes "com.mobymagic.shazamclone.dev" | |
versionNameSuffix "-dev" // The versionName you define above now have a "-dev" suffix | |
resValue "string", "app_name", "Shazam Clone Dev" // Changes the app name to "Shazam Clone Dev" | |
// [Performance optimization] The following configuration limits the "dev" flavor | |
// to using English string resources and xxhdpi screen-density resources. | |
resConfigs "en", "xxhdpi" | |
} | |
mock { | |
dimension "default" | |
applicationIdSuffix '.mock' | |
versionNameSuffix "-mock" | |
resValue "string", "app_name", "Shazam Clone Mock" | |
} | |
prod { | |
dimension "default" | |
resValue "string", "app_name", "Shazam Clone" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment