diff --git a/app/build.gradle b/app/build.gradle
index 037194e73..844f12227 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
-apply plugin: "de.timfreiheit.resourceplaceholders"
+apply plugin: 'de.timfreiheit.resourceplaceholders'
apply plugin: 'io.fabric'
androidExtensions {
@@ -19,6 +19,7 @@ def gitCommits = Integer.parseInt('git rev-list --count HEAD'.execute([], projec
android {
compileSdkVersion 29
+ flavorDimensions ("version")
signingConfigs {
if (project.hasProperty("RELEASE_STORE_FILE")) {
myConfig {
@@ -73,7 +74,17 @@ android {
}
}
}
-
+ productFlavors {
+ app {
+ dimension "version"
+ manifestPlaceholders = [APP_CHANNEL_VALUE: "app"]
+ }
+ google {
+ dimension "version"
+ applicationId "io.legado.play"
+ manifestPlaceholders = [APP_CHANNEL_VALUE: "google"]
+ }
+ }
compileOptions {
// Flag to enable support for the new language APIs
//coreLibraryDesugaringEnabled true
@@ -99,27 +110,27 @@ kapt {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
- testImplementation 'junit:junit:4.12'
+ testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
//kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
//fireBase
- implementation 'com.google.firebase:firebase-core:17.2.3'
+ implementation 'com.google.firebase:firebase-core:17.3.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
//androidX
implementation 'androidx.core:core-ktx:1.2.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.media:media:1.1.0'
- implementation 'androidx.preference:preference:1.1.0'
+ implementation 'androidx.preference:preference:1.1.1'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'
implementation 'androidx.viewpager2:viewpager2:1.0.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'com.google.android:flexbox:1.1.0'
- implementation 'com.google.code.gson:gson:2.8.5'
+ implementation 'com.google.code.gson:gson:2.8.6'
//lifecycle
def lifecycle_version = '2.2.0'
@@ -127,12 +138,12 @@ dependencies {
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
//room
- def room_version = '2.2.4'
+ def room_version = '2.2.5'
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
//paging
- implementation 'androidx.paging:paging-runtime:2.1.1'
+ implementation 'androidx.paging:paging-runtime:2.1.2'
//anko
def anko_version = '0.10.8'
@@ -148,19 +159,19 @@ dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
//规则相关
- implementation 'org.jsoup:jsoup:1.12.1'
+ implementation 'org.jsoup:jsoup:1.13.1'
implementation 'cn.wanghaomiao:JsoupXpath:2.3.2'
implementation 'com.jayway.jsonpath:json-path:2.4.0'
//JS rhino
implementation 'com.github.gedoor:rhino-android:1.4'
- //Retrofit
- implementation 'com.squareup.okhttp3:logging-interceptor:4.1.0'
- implementation 'com.squareup.retrofit2:retrofit:2.6.1'
+ //网络
+ //noinspection GradleDependency
+ implementation 'com.squareup.retrofit2:retrofit:2.7.2'
//Glide
- implementation 'com.github.bumptech.glide:glide:4.9.0'
+ implementation 'com.github.bumptech.glide:glide:4.11.0'
//webServer
implementation 'org.nanohttpd:nanohttpd:2.3.1'
@@ -173,14 +184,14 @@ dependencies {
implementation 'com.jaredrummler:colorpicker:1.1.0'
//apache
- implementation 'org.apache.commons:commons-lang3:3.9'
+ implementation 'org.apache.commons:commons-lang3:3.10'
implementation 'org.apache.commons:commons-text:1.8'
//MarkDown
- implementation 'ru.noties.markwon:core:3.0.2'
+ implementation 'ru.noties.markwon:core:3.1.0'
//转换繁体
- implementation 'com.github.houbb:opencc4j:1.4.0'
+ implementation 'com.hankcs:hanlp:portable-1.7.7'
}
diff --git a/app/google-services.json b/app/google-services.json
index fb88090cb..314a5ea7c 100644
--- a/app/google-services.json
+++ b/app/google-services.json
@@ -92,6 +92,35 @@
]
}
}
+ },
+ {
+ "client_info": {
+ "mobilesdk_app_id": "1:453392274790:android:b891abd2331577dff624a7",
+ "android_client_info": {
+ "package_name": "io.legado.play.release"
+ }
+ },
+ "oauth_client": [
+ {
+ "client_id": "453392274790-hnbpatpce9hbjiggj76hgo7queu86atq.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ],
+ "api_key": [
+ {
+ "current_key": "AIzaSyD90mfNLhA7cAzzI9SonpSz5mrF5BnmyJA"
+ }
+ ],
+ "services": {
+ "appinvite_service": {
+ "other_platform_oauth_client": [
+ {
+ "client_id": "453392274790-hnbpatpce9hbjiggj76hgo7queu86atq.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ]
+ }
+ }
}
],
"configuration_version": "1"
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
index 9af1203b9..1e8ab731b 100644
--- a/app/proguard-rules.pro
+++ b/app/proguard-rules.pro
@@ -160,7 +160,6 @@
-dontwarn rx.**
-dontwarn okio.**
--dontwarn retrofit2.**
-dontwarn javax.annotation.**
-dontwarn org.apache.log4j.lf5.viewer.**
-dontnote org.apache.log4j.lf5.viewer.**
@@ -172,7 +171,6 @@
-dontwarn com.jeremyliao.liveeventbus.**
-keep class com.jeremyliao.liveeventbus.** { *; }
--keep class retrofit2.**{*;}
-keep class okhttp3.**{*;}
-keep class okio.**{*;}
-keep class com.hwangjr.rxbus.**{*;}
diff --git a/app/src/debug/res/values/strings.xml b/app/src/debug/res/values/strings.xml
index b91572ada..e4464c88d 100644
--- a/app/src/debug/res/values/strings.xml
+++ b/app/src/debug/res/values/strings.xml
@@ -1,4 +1,4 @@