WIP fix transformClassesAndResourcesWithProguardForOfficialPhotonDebugAndroidTest
draft
WIP fix transformClassesAndResourcesWithProguardForOfficialPhotonDebugAndroidTest
MozReview-Commit-ID: 4IzMhDPSXuk
--- a/mobile/android/app/build.gradle
+++ b/mobile/android/app/build.gradle
@@ -59,16 +59,17 @@ android {
// unfortunate side effect of Proguarding the instrumentation (Robocop) APK, but nothing
// uses runtime inspection or class-loading with that APK, so it shouldn't be a problem.
def configureMinifyClosure = {
// Bug 1229269: we can't yet shrinkResources effectively. Be sure
// to use -stripped.ap_ after enabling this.
// shrinkResources true
minifyEnabled true
proguardFile "${topsrcdir}/mobile/android/config/proguard/proguard.cfg"
+ testProguardFile "${topsrcdir}/mobile/android/config/proguard/proguard-test.pro"
}
release configureMinifyClosure
if (mozconfig.substs.MOZILLA_OFFICIAL) {
debug configureMinifyClosure
}
}
// The "audience" flavour dimension distinguishes between _local_ builds (intended for
new file mode 100644
--- /dev/null
+++ b/mobile/android/config/proguard/proguard-test.pro
@@ -0,0 +1,22 @@
+# proguard-test.cfg:
+-include proguard.cfg
+
+-keepattributes SourceFile,LineNumberTable
+
+# ------------------- TEST DEPENDENCIES -------------------
+-dontwarn org.hamcrest.**
+-dontwarn android.test.**
+-dontwarn android.support.test.**
+
+-keep class org.hamcrest.** {
+ *;
+}
+
+-keep class org.junit.** { *; }
+-dontwarn org.junit.**
+
+-keep class junit.** { *; }
+-dontwarn junit.**
+
+-keep class sun.misc.** { *; }
+-dontwarn sun.misc.**