From c0bd6d0882ff05d732bfcb82ef797e72c222e00f Mon Sep 17 00:00:00 2001 From: Adnan Begovic Date: Mon, 7 Mar 2016 11:16:58 -0800 Subject: [PATCH] cmsdk: Clean up proguard flags. -dontskipnonpubliclibraryclasses and class members covers the processing of external libraries which makes the -injars option defunct. Also keep more android support related classes for when we expand the test package for more coverage. TICKET: CYNGNOS-2189 Change-Id: I37b66acdac86400f41d1f7f1e6610d1d9ca480b3 --- tests/proguard.flags | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/tests/proguard.flags b/tests/proguard.flags index abd3e06..e2a11a2 100644 --- a/tests/proguard.flags +++ b/tests/proguard.flags @@ -12,20 +12,33 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Make sure to process the dependency jack file from cmsdk compile --injars ../../../out/target/common/obj/JAVA_LIBRARIES/org.cyanogenmod.platform.sdk_intermediates/classes.jack - # Don't skip non public library classes, make sure we're not keeping anything which will get mapped against api verification. -dontskipnonpubliclibraryclasses # Do the same with class members -dontskipnonpubliclibraryclassmembers +# Keep test packages +-keep class android.support.** { *; } +-keep class android.test.** { *; } +-keep public class * extends android.support.** { *; } +-keep public class * extends android.test.** { *; } +-keep interface android.support.** { *; } +-keep interface android.test.** { *; } + +# Keep all junit classes +-keep class junit.** { *; } +-keep class org.junit.** { *; } +-keep interface junit.** { *; } +-keep interface org.junit.** { *; } + # Don't warn about the Android Support Test JUnit Runner --dontwarn android.support.test.runner.AndroidJUnitRunner +-dontwarn android.support.** +-dontwarn android.test.** # Don't warn about junit -dontwarn junit.** +-dontwarn org.junit.** # Always process -forceprocessing