use custom proguard config for running tests

The new Android Testing Support library stuff causes proguard to freak
out, so make proguard ignore all that stuff when running tests.
This commit is contained in:
Hans-Christoph Steiner 2016-04-04 11:59:35 +02:00
förälder fc0df0dcf4
incheckning 70864e3479
2 ändrade filer med 17 tillägg och 0 borttagningar

Visa fil

@ -132,6 +132,7 @@ android {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
testProguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro', 'src/androidTest/proguard-rules.pro'
}
debug {
testCoverageEnabled = true

16
app/src/androidTest/proguard-rules.pro vendored Normal file
Visa fil

@ -0,0 +1,16 @@
-dontwarn android.test.**
-dontwarn android.support.test.**
-dontnote junit.framework.**
-dontnote junit.runner.**
# Uncomment this if you use Mockito
#-dontwarn org.mockito.**
-keep class org.hamcrest.** { *; }
-dontwarn org.hamcrest.**
-keep class org.junit.** { *; }
-dontwarn org.junit.**
-keep class junit.** { *; }
-dontwarn junit.**