mirror of
https://github.com/gedoor/legado.git
synced 2024-09-01 09:34:25 +08:00
feat: 优化
This commit is contained in:
parent
6d087c1027
commit
50c5385889
@ -66,7 +66,6 @@ android {
|
||||
applicationIdSuffix '.debug'
|
||||
versionNameSuffix 'debug'
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
android.applicationVariants.all { variant ->
|
||||
variant.outputs.all {
|
||||
@ -121,7 +120,7 @@ dependencies {
|
||||
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
||||
|
||||
//androidX
|
||||
implementation 'androidx.core:core-ktx:1.2.0'
|
||||
implementation 'androidx.core:core-ktx:1.3.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'androidx.media:media:1.1.0'
|
||||
implementation 'androidx.preference:preference:1.1.1'
|
||||
|
81
app/proguard-rules.pro
vendored
81
app/proguard-rules.pro
vendored
@ -58,21 +58,20 @@
|
||||
# 保留我们使用的四大组件,自定义的Application等等这些类不被混淆
|
||||
# 因为这些子类都有可能被外部调用
|
||||
-keep public class * extends android.app.Activity
|
||||
-keep public class * extends android.app.Appliction
|
||||
-keep public class * extends android.app.Application
|
||||
-keep public class * extends android.app.Service
|
||||
-keep public class * extends android.content.BroadcastReceiver
|
||||
-keep public class * extends android.content.ContentProvider
|
||||
-keep public class * extends android.app.backup.BackupAgentHelper
|
||||
-keep public class * extends android.preference.Preference
|
||||
-keep public class * extends android.view.View
|
||||
-keep public class com.android.vending.licensing.ILicensingService
|
||||
|
||||
|
||||
# 保留androidx下的所有类及其内部类
|
||||
-keep class androidx.** {*;}
|
||||
-keep class androidx** {*;}
|
||||
|
||||
# 保留继承的
|
||||
-keep public class * extends androidx.**
|
||||
-keep public class * extends androidx**
|
||||
|
||||
# 保留R下面的资源
|
||||
-keep class **.R$* {*;}
|
||||
@ -105,6 +104,7 @@
|
||||
|
||||
# 保留Parcelable序列化类不被混淆
|
||||
-keep class * implements android.os.Parcelable {
|
||||
#noinspection ShrinkerUnresolvedReference
|
||||
public static final android.os.Parcelable$Creator *;
|
||||
}
|
||||
|
||||
@ -128,16 +128,11 @@
|
||||
}
|
||||
|
||||
# webView处理,项目中没有使用到webView忽略即可
|
||||
-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
public *;
|
||||
}
|
||||
-keepclassmembers class * extends android.webkit.webViewClient {
|
||||
-keepclassmembers class * extends android.webkit.WebViewClient {
|
||||
public void *(android.webkit.WebView, java.lang.String);
|
||||
public void *(android.webkit.WebView, java.lang.String, android.graphics.Bitmap);
|
||||
public boolean *(android.webkit.WebView, java.lang.String);
|
||||
}
|
||||
-keepclassmembers class * extends android.webkit.webViewClient {
|
||||
public void *(android.webkit.webView, jav.lang.String);
|
||||
}
|
||||
|
||||
# 移除Log类打印各个等级日志的代码,打正式包的时候可以做为禁log使用,这里可以作为禁止log打印的功能使用
|
||||
# 记得proguard-android.txt中一定不要加-dontoptimize才起作用
|
||||
@ -151,11 +146,11 @@
|
||||
}
|
||||
|
||||
# 保持js引擎调用的java类
|
||||
-keep class **.analyzeRule.**{*;}
|
||||
-keep class **.analyzeRule**{*;}
|
||||
# 保持web类
|
||||
-keep class **.web.**{*;}
|
||||
-keep class **.web**{*;}
|
||||
#数据类
|
||||
-keep class **.data.**{*;}
|
||||
-keep class **.data**{*;}
|
||||
|
||||
-dontwarn rx.**
|
||||
|
||||
@ -170,55 +165,53 @@
|
||||
-dontwarn org.conscrypt.**
|
||||
-dontwarn com.jeremyliao.liveeventbus.**
|
||||
|
||||
-keep class com.jeremyliao.liveeventbus.** { *; }
|
||||
-keep class okhttp3.**{*;}
|
||||
-keep class okio.**{*;}
|
||||
-keep class com.hwangjr.rxbus.**{*;}
|
||||
-keep class org.conscrypt.**{*;}
|
||||
-keep class com.kunfei.bookshelf.widget.**{*;}
|
||||
-keep class com.kunfei.bookshelf.bean.**{*;}
|
||||
-keep class android.support.**{*;}
|
||||
-keep class me.grantland.widget.**{*;}
|
||||
-keep class de.hdodenhof.circleimageview.**{*;}
|
||||
-keep class tyrant.explosionfield.**{*;}
|
||||
-keep class tyrantgit.explosionfield.**{*;}
|
||||
-keep class freemarker.**{*;}
|
||||
-keep class com.jeremyliao.liveeventbus** { *; }
|
||||
-keep class okhttp3**{*;}
|
||||
-keep class okio**{*;}
|
||||
-keep class com.hwangjr.rxbus**{*;}
|
||||
-keep class org.conscrypt**{*;}
|
||||
-keep class android.support**{*;}
|
||||
-keep class me.grantland.widget**{*;}
|
||||
-keep class de.hdodenhof.circleimageview**{*;}
|
||||
-keep class tyrant.explosionfield**{*;}
|
||||
-keep class tyrantgit.explosionfield**{*;}
|
||||
-keep class freemarker**{*;}
|
||||
-keep class com.gyf.barlibrary.* {*;}
|
||||
##JSOUP
|
||||
-keep class org.jsoup.**{*;}
|
||||
-keep class **.xpath.**{*;}
|
||||
-keep class org.jsoup**{*;}
|
||||
-keep class **.xpath**{*;}
|
||||
|
||||
-keep class org.slf4j.**{*;}
|
||||
-keep class org.slf4j**{*;}
|
||||
-dontwarn org.slf4j.**
|
||||
|
||||
-keep class org.codehaus.**{*;}
|
||||
-keep class org.codehaus**{*;}
|
||||
-dontwarn org.codehaus.**
|
||||
-keep class com.jayway.**{*;}
|
||||
-keep class com.jayway**{*;}
|
||||
-dontwarn com.jayway.**
|
||||
-keep class com.fasterxml.**{*;}
|
||||
-keep class com.fasterxml**{*;}
|
||||
|
||||
-keep class javax.swing..**{*;}
|
||||
-keep class javax.swing**{*;}
|
||||
-dontwarn javax.swing.**
|
||||
-keep class java.awt.**{*;}
|
||||
-keep class java.awt**{*;}
|
||||
-dontwarn java.awt.**
|
||||
-keep class sun.misc.**{*;}
|
||||
-keep class sun.misc**{*;}
|
||||
-dontwarn sun.misc.**
|
||||
-keep class sun.reflect.**{*;}
|
||||
-keep class sun.reflect**{*;}
|
||||
-dontwarn sun.reflect.**
|
||||
|
||||
## Rhino
|
||||
-keep class javax.script.** { *; }
|
||||
-keep class com.sun.script.javascript.** { *; }
|
||||
-keep class org.mozilla.javascript.** { *; }
|
||||
-keep class javax.script** { *; }
|
||||
-keep class com.sun.script.javascript** { *; }
|
||||
-keep class org.mozilla.javascript** { *; }
|
||||
|
||||
###EPUB
|
||||
-dontwarn nl.siegmann.epublib.**
|
||||
-dontwarn org.xmlpull.**
|
||||
-keep class nl.siegmann.epublib.**{*;}
|
||||
-keep class javax.xml.**{*;}
|
||||
-keep class org.xmlpull.**{*;}
|
||||
-keep class nl.siegmann.epublib**{*;}
|
||||
-keep class javax.xml**{*;}
|
||||
-keep class org.xmlpull**{*;}
|
||||
|
||||
-keep class org.simpleframework.xml.**{*;}
|
||||
-keep class org.simpleframework.xml**{*;}
|
||||
-dontwarn org.simpleframework.xml.**
|
||||
|
||||
-keepclassmembers class * {
|
||||
|
@ -10,7 +10,7 @@ buildscript {
|
||||
maven { url 'https://plugins.gradle.org/m2/' }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.6.3'
|
||||
classpath 'com.android.tools.build:gradle:4.0.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath 'de.timfreiheit.resourceplaceholders:placeholders:0.3'
|
||||
classpath 'com.google.gms:google-services:4.3.3'
|
||||
|
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
||||
#Tue Feb 25 08:10:32 CST 2020
|
||||
#Sat May 30 10:00:31 CST 2020
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
|
||||
|
Loading…
Reference in New Issue
Block a user