diff --git a/build.gradle b/build.gradle index 765f1a4222..2bd51cfb9c 100644 --- a/build.gradle +++ b/build.gradle @@ -127,6 +127,7 @@ dependencyVerification { android { compileSdkVersion 22 buildToolsVersion '22.0.1' + testBuildType "testing" dexOptions { javaMaxHeapSize "4g" @@ -188,6 +189,10 @@ android { 'proguard.cfg' signingConfig signingConfigs.release } + testing.initWith(buildTypes.debug) + testing { + proguardFile 'proguard-testing.pro' + } } sourceSets { diff --git a/proguard-appcompat-v7.pro b/proguard-appcompat-v7.pro index 4d1f32881c..718eb9da93 100644 --- a/proguard-appcompat-v7.pro +++ b/proguard-appcompat-v7.pro @@ -1,8 +1,9 @@ +# https://code.google.com/p/android/issues/detail?id=78377 +-keepnames class !android.support.v7.internal.view.menu.**, ** { *; } + -keep public class android.support.v7.widget.** { *; } -keep public class android.support.v7.internal.widget.** { *; } -# below line disabled due to LGE ROM bug. -# -keep public class android.support.v7.internal.view.menu.** { *; } -keep public class * extends android.support.v4.view.ActionProvider { public (android.content.Context); -} \ No newline at end of file +} diff --git a/proguard-testing.pro b/proguard-testing.pro new file mode 100644 index 0000000000..affdfd8b0e --- /dev/null +++ b/proguard-testing.pro @@ -0,0 +1,10 @@ +-keepattributes Exceptions +-dontskipnonpubliclibraryclassmembers + +-dontwarn android.test.** +-dontwarn com.android.support.test.** +-dontwarn sun.reflect.** +-dontwarn org.assertj.** +-dontwarn org.hamcrest.** +-dontwarn org.mockito.** +-dontwarn com.squareup.**