From 3729cd9c19b2245a3e3f91de403661b10f370488 Mon Sep 17 00:00:00 2001 From: Conny Duck Date: Fri, 11 Aug 2017 19:19:35 +0200 Subject: [PATCH 1/2] fix proguard config for new libraries --- app/proguard-rules.pro | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 80b43f0bb..307099396 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -18,10 +18,16 @@ ## for okhttp -dontwarn okio.** +-dontwarn javax.annotation.Nullable +-dontwarn javax.annotation.ParametersAreNonnullByDefault ## for picasso -dontwarn com.squareup.okhttp.** +##for keep +-dontwarn android.arch.util.paging.CountedDataSource +-dontwarn android.arch.persistence.room.paging.LimitOffsetDataSource + ## for retrofit -dontwarn retrofit2.** -keep class retrofit2.** { *; } @@ -45,13 +51,13 @@ -keepattributes SourceFile,LineNumberTable # remove all logging from production apk -#-assumenosideeffects class android.util.Log { -# public static *** getStackTraceString(...); -# public static *** d(...); -# public static *** w(...); -# public static *** v(...); -# public static *** i(...); -#} +-assumenosideeffects class android.util.Log { + public static *** getStackTraceString(...); + public static *** d(...); + public static *** w(...); + public static *** v(...); + public static *** i(...); +} # for jsoup -keep public class org.jsoup.** { From 98376221ee72d99b367703b209957733b4addd44 Mon Sep 17 00:00:00 2001 From: Conny Duck Date: Fri, 11 Aug 2017 19:24:03 +0200 Subject: [PATCH 2/2] remove metadata files of jsoup library from final build --- app/build.gradle | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/build.gradle b/app/build.gradle index dfea8a9e0..65743a86a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -26,6 +26,11 @@ android { lintOptions { disable 'MissingTranslation' } + packagingOptions { //remove metadata files of jsoup library from final build + exclude 'META-INF/CHANGES' + exclude 'META-INF/LICENSE' + exclude 'META-INF/README.md' + } } ext.supportLibraryVersion = '26.0.0'