From fa80569374fc7f18c45fccdf85488c332e16d4e9 Mon Sep 17 00:00:00 2001 From: gedoor Date: Thu, 29 Jul 2021 17:05:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 6 +++--- app/src/main/java/io/legado/app/App.kt | 1 - app/src/main/java/io/legado/app/help/http/HttpHelper.kt | 1 - .../java/io/legado/app/help/http/cronet/CronetLoader.java | 5 ++--- build.gradle | 6 +++--- gradle/wrapper/gradle-wrapper.properties | 2 +- 6 files changed, 9 insertions(+), 12 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 30e87f697..a93d3bc1e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -89,9 +89,9 @@ android { dimension "mode" applicationId "io.legado.cronet" manifestPlaceholders = [APP_CHANNEL_VALUE: "cronet"] -// ndk { -// abiFilters 'arm64-v8a','armeabi-v7a' -// } + ndk { + //abiFilters 'arm64-v8a','armeabi-v7a' + } } } compileOptions { diff --git a/app/src/main/java/io/legado/app/App.kt b/app/src/main/java/io/legado/app/App.kt index 0f277f010..dab8a3d55 100644 --- a/app/src/main/java/io/legado/app/App.kt +++ b/app/src/main/java/io/legado/app/App.kt @@ -14,7 +14,6 @@ import io.legado.app.help.AppConfig import io.legado.app.help.CrashHandler import io.legado.app.help.LifecycleHelp import io.legado.app.help.ThemeConfig.applyDayNight -import io.legado.app.help.http.cronet.CronetLoader import io.legado.app.utils.LanguageUtils import io.legado.app.utils.defaultSharedPreferences diff --git a/app/src/main/java/io/legado/app/help/http/HttpHelper.kt b/app/src/main/java/io/legado/app/help/http/HttpHelper.kt index 4e1864b02..0bbf44831 100644 --- a/app/src/main/java/io/legado/app/help/http/HttpHelper.kt +++ b/app/src/main/java/io/legado/app/help/http/HttpHelper.kt @@ -2,7 +2,6 @@ package io.legado.app.help.http import io.legado.app.help.AppConfig import io.legado.app.help.http.cronet.CronetInterceptor -import io.legado.app.help.http.cronet.CronetLoader import kotlinx.coroutines.suspendCancellableCoroutine import okhttp3.ConnectionSpec import okhttp3.Credentials diff --git a/app/src/main/java/io/legado/app/help/http/cronet/CronetLoader.java b/app/src/main/java/io/legado/app/help/http/cronet/CronetLoader.java index bad5053ac..e77efe874 100644 --- a/app/src/main/java/io/legado/app/help/http/cronet/CronetLoader.java +++ b/app/src/main/java/io/legado/app/help/http/cronet/CronetLoader.java @@ -56,8 +56,6 @@ public class CronetLoader extends CronetEngine.Builder.LibraryLoader { File dir = mContext.getDir("lib", Context.MODE_PRIVATE); soFile = new File(dir + "/" + getCpuAbi(), soName); downloadFile = new File(mContext.getCacheDir() + "/so_download", soName); - - } public boolean install() { @@ -150,7 +148,8 @@ public class CronetLoader extends CronetEngine.Builder.LibraryLoader { public static String getCpuAbi() { - //貌似只有这个过时了的API能获取当前APP使用的ABI + //貌似只有这个过时了的API能获取当前APP使用的ABI,添加注解免得编译时报错 + //noinspection deprecation return Build.CPU_ABI; } diff --git a/build.gradle b/build.gradle index 28a0006f8..537e02b97 100644 --- a/build.gradle +++ b/build.gradle @@ -5,14 +5,14 @@ buildscript { repositories { google() mavenCentral() + maven { url 'https://plugins.gradle.org/m2/' } maven { url 'https://maven.aliyun.com/repository/public' } maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } - maven { url 'https://plugins.gradle.org/m2/' } } dependencies { - classpath 'com.android.tools.build:gradle:4.2.2' + classpath 'com.android.tools.build:gradle:7.0.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath 'de.timfreiheit.resourceplaceholders:placeholders:0.3' + classpath 'de.timfreiheit.resourceplaceholders:placeholders:0.4' } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f96ca89e9..4a88e2259 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Fri May 07 15:24:46 CST 2021 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME