I have parts of my app that I don't want to run if we're running Android unit tests, so I want to surround them with something like
if (!BuildConfig.TESTING) {
// Code here that I don't want to run during tests.
}
Is it possible to populate this BuildConfig
flag depending on whether the connectedAndroidTest
gradle task is used? Is this a sane way of approaching this problem?