android - Can I set a BuildConfig flag that returns whether or not an apk is built with the `connectedAndroidTest` gradle task? -


i have parts of app don't want run if we're running android unit tests, want surround them like

if (!buildconfig.testing) {   // code here don't want run during tests. } 

is possible populate buildconfig flag depending on whether connectedandroidtest gradle task used? sane way of approaching problem?


Comments

Popular posts from this blog

visual studio - vb.net filter binding source by time -

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -