Created
May 10, 2016 10:11
-
-
Save talosdev/789cca0ac5dc2ec22d6b3921bddbebad to your computer and use it in GitHub Desktop.
Create mockDebug, prodDebug, prodRelease 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
// If you need to add more flavors, consider using flavor dimensions. | |
productFlavors { | |
mock { | |
applicationIdSuffix = ".mock" | |
} | |
prod { | |
} | |
} | |
// Remove mockRelease as it's not needed. | |
android.variantFilter { variant -> | |
if(variant.buildType.name.equals('release') | |
&& variant.getFlavors().get(0).name.equals('mock')) { | |
variant.setIgnore(true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Credit:
https://codelabs.developers.google.com/codelabs/android-testing