Skip to content

Instantly share code, notes, and snippets.

@talosdev
Created May 10, 2016 10:11
Show Gist options
  • Save talosdev/789cca0ac5dc2ec22d6b3921bddbebad to your computer and use it in GitHub Desktop.
Save talosdev/789cca0ac5dc2ec22d6b3921bddbebad to your computer and use it in GitHub Desktop.
Create mockDebug, prodDebug, prodRelease flavors
// 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);
}
}
@talosdev
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment