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
Post a Comment