android - How to Use Gradle to bypass login screen -


i bypass login screen in app while development. can use gradle product flavor accomplish ? currenlty use following approach

if (buildconfig.debug) {             mpresenter.onloginclick("xxx", "yyy");         } 

is possible have code in 1 of product flavor instead of debug builds ?

as described here can add flavors using productflavors closure under android element in build script.

for flavors can use buildconfigfield add option, example buildconfigfield "boolean", "skip_login", "true". in app can check build-time value looking @ buildconfig.skip_login.


Comments