Horis před 1 rokem
rodič
revize
c17febab91
2 změnil soubory, kde provedl 21 přidání a 2 odebrání
  1. 10 0
      app/build.gradle
  2. 11 2
      app/proguard-rules.pro

+ 10 - 0
app/build.gradle

@@ -74,6 +74,11 @@ android {
     }
     buildTypes {
         release {
+            ndk {
+                //noinspection ChromeOsAbiSupport
+                abiFilters 'armeabi-v7a', 'arm64-v8a'
+            }
+
             if (project.hasProperty("RELEASE_STORE_FILE")) {
                 signingConfig signingConfigs.myConfig
             }
@@ -89,6 +94,11 @@ android {
             proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro', 'cronet-proguard-rules.pro'
         }
         debug {
+            ndk {
+                //noinspection ChromeOsAbiSupport
+                abiFilters 'armeabi-v7a', 'arm64-v8a'
+            }
+
             if (project.hasProperty("RELEASE_STORE_FILE")) {
                 signingConfig signingConfigs.myConfig
             }

+ 11 - 2
app/proguard-rules.pro

@@ -48,6 +48,7 @@
 # 这个过滤器是谷歌推荐的算法,一般不做更改
 -optimizations !code/simplification/cast,!field/*,!class/merging/*
 
+-repackageclasses
 
 #############################################
 #
@@ -193,13 +194,11 @@ cn.hutool.core.**{*;}
 -dontwarn com.hwangjr.rxbus.**
 -dontwarn okhttp3.**
 -dontwarn org.conscrypt.**
--dontwarn com.jeremyliao.liveeventbus.**
 -dontwarn org.commonmark.ext.gfm.**
 
 -keep,allowobfuscation,allowshrinking class com.google.gson.** { *; }
 -keep,allowobfuscation,allowshrinking class com.ke.gson.** { *; }
 -keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
--keep class com.jeremyliao.liveeventbus.** { *; }
 -keep class okhttp3.**{*;}
 -keep class okio.**{*;}
 -keep class com.hwangjr.rxbus.**{*;}
@@ -211,6 +210,16 @@ cn.hutool.core.**{*;}
 -keep class freemarker.**{*;}
 -keep class com.gyf.barlibrary.** {*;}
 
+# LiveEventBus
+-keep class androidx.lifecycle.LiveData {
+    *** mObservers;
+    *** mActiveCount;
+}
+-keep class androidx.arch.core.internal.SafeIterableMap {
+    *** size();
+    *** putIfAbsent(...);
+}
+
 ## JSOUP
 -keep class org.jsoup.**{*;}
 -keep class **.xpath.**{*;}