I'm trying to configure proguard to use it with my espresso UI test flavor. The thing is Proguard tends to ignore my debug proguard config.
This is how the config looks:
buildTypes {
debug {
minifyEnabled true
proguardFiles 'proguard-debug.pro'
testProguardFile 'proguard-debug.pro'
signingConfig signingConfigs.release
}
}
I added testProguardFile
but it doesn't seem to work on androidTest
. I'm running mockDebug
flavor variant. When I just run the app it works fine, but when I try to run test which is located in adnroidTest
it won't run due to proguard warnings, like the proguard file wasn't processed at all and the file is pretty straight forward:
proguard-debug.pro
-dontobfuscate
-dontoptimize
-dontwarn
Before someone starts to advise me turning off proguard for debug builds: I need to have it enabled because of multidex.