优化
This commit is contained in:
@@ -177,6 +177,7 @@ dependencies {
|
|||||||
//Kotlin反射
|
//Kotlin反射
|
||||||
//noinspection GradleDependency,DifferentStdlibGradleVersion
|
//noinspection GradleDependency,DifferentStdlibGradleVersion
|
||||||
implementation(libs.kotlin.reflect)
|
implementation(libs.kotlin.reflect)
|
||||||
|
//implementation(libs.kotlin.reflect)
|
||||||
|
|
||||||
|
|
||||||
//协程
|
//协程
|
||||||
|
|||||||
@@ -1,15 +1,13 @@
|
|||||||
package io.legado.app.help.http
|
package io.legado.app.help.http
|
||||||
|
|
||||||
|
import io.legado.app.lib.cronet.CronetLoader
|
||||||
import okhttp3.CookieJar
|
import okhttp3.CookieJar
|
||||||
import okhttp3.Interceptor
|
import okhttp3.Interceptor
|
||||||
|
|
||||||
object Cronet {
|
object Cronet {
|
||||||
|
|
||||||
val loader: LoaderInterface? by lazy {
|
val loader: LoaderInterface? by lazy {
|
||||||
kotlin.runCatching {
|
CronetLoader
|
||||||
Class.forName("io.legado.app.lib.cronet.CronetLoader")
|
|
||||||
.kotlin.objectInstance as LoaderInterface
|
|
||||||
}.getOrNull()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun preDownload() {
|
fun preDownload() {
|
||||||
|
|||||||
@@ -5,11 +5,8 @@ import kotlinx.coroutines.CoroutineScope
|
|||||||
|
|
||||||
object AppUpdate {
|
object AppUpdate {
|
||||||
|
|
||||||
val gitHubUpdate by lazy {
|
val gitHubUpdate: AppUpdateInterface? by lazy {
|
||||||
kotlin.runCatching {
|
AppUpdateGitHub
|
||||||
Class.forName("io.legado.app.help.update.AppUpdateGitHub")
|
|
||||||
.kotlin.objectInstance as AppUpdateInterface
|
|
||||||
}.getOrNull()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
data class UpdateInfo(
|
data class UpdateInfo(
|
||||||
|
|||||||
Reference in New Issue
Block a user