I want to be able to run UI tests on a minified build. However when I run
./gradlew connectedDebugAndroidTest
I get this error:
> Task :app:minifyDebugAndroidTestWithR8
R8: 'void zza(com.google.android.gms.common.internal.BaseGmsClient,int,android.os.IInterface)' already has a mapping
I tried creating a separate proguard file for the tests:
buildTypes {
debug {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
testProguardFile 'proguard-test.pro'
# proguard-test.pro:
-include proguard-rules.pro
-keepattributes SourceFile,LineNumberTable
-dontobfuscate
-dontwarn
-dontshrink
But that didn't help. Not sure what else to try.