From f9ee53d753616e8cf09ae828d3ae72370e65215c 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 80b43f0b..30709939 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 931836a56d8bc1528a1049175fd40748b5fbe0c1 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 dfea8a9e..65743a86 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'