启用gradle的minifyEnabled (#2356)

* 修复文件类书源换源后阅读按钮工作不正确的bug

* 修复文件类书源换源后阅读按钮工作不正确的bug

* chore: rename EventBus.BOOK_URL_CHANGED

* build: enable minifyEnabled for buildType Release

 - add proguard-rules: StrResponse CacheManager CookieStore hutool
 - fix com.google.android.exoplayer2 proguard-rules

* build: keep io.legado.app.api.ReturnData
pull/2361/head
Xwite 2 years ago committed by GitHub
parent a2018bbb89
commit 140d2319d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      app/build.gradle
  2. 17
      app/proguard-rules.pro

@ -69,7 +69,8 @@ android {
}
applicationIdSuffix '.release'
minifyEnabled false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {

@ -149,8 +149,16 @@
-keep class **.analyzeRule.**{*;}
# 保持web类
-keep class **.web.**{*;}
#数据类
# 数据类
-keep class **.data.**{*;}
# hutool-core hutool-crypto
-keep class cn.hutool.core.**{*;}
-keep class cn.hutool.crypto.**{*;}
# 缓存 Cookie
-keep class **.help.http.CookieStore{*;}
-keep class **.help.CacheManager{*;}
# StrResponse
-keep class **.help.http.StrResponse{*;}
-dontwarn rx.**
-dontwarn okio.**
@ -231,4 +239,9 @@
}
## 保证该私有变量不被混淆
-keepclassmembers class com.google.android.exoplayer2.upstream.cache.CacheDataSource$Factory{upstreamDataSourceFactory;}
-keepclassmembers class com.google.android.exoplayer2.upstream.cache.CacheDataSource$Factory {
private DataSource.Factory upstreamDataSourceFactory;
}
## web服务传输数据
-keep class io.legado.app.api.ReturnData{*;}
Loading…
Cancel
Save