diff --git a/app/build.gradle b/app/build.gradle index 6cb7d74..042a17f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,11 +1,11 @@ plugins { id 'com.android.application' id 'kotlin-android' - id 'com.google.devtools.ksp' version '1.6.21-1.0.5' + id 'com.google.devtools.ksp' version '1.7.0-1.0.6' } android { - compileSdk 31 + compileSdk 32 signingConfigs { debug { @@ -21,7 +21,7 @@ android { defaultConfig { applicationId "com.fankes.miui.notify" minSdk 28 - targetSdk 31 + targetSdk 32 versionCode rootProject.ext.appVersionCode versionName rootProject.ext.appVersionName @@ -63,10 +63,10 @@ dependencies { ksp 'com.highcapable.yukihookapi:ksp-xposed:1.0.92' implementation "com.github.topjohnwu.libsu:core:3.1.2" implementation 'androidx.annotation:annotation:1.3.0' - implementation 'com.squareup.okhttp3:okhttp:4.9.3' - implementation 'androidx.core:core-ktx:1.7.0' - implementation 'androidx.appcompat:appcompat:1.4.1' - implementation 'com.google.android.material:material:1.6.0' + implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.7' + implementation 'androidx.core:core-ktx:1.8.0' + implementation 'androidx.appcompat:appcompat:1.4.2' + implementation 'com.google.android.material:material:1.6.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.3' diff --git a/app/src/main/java/com/fankes/miui/notify/ui/activity/base/BaseActivity.kt b/app/src/main/java/com/fankes/miui/notify/ui/activity/base/BaseActivity.kt index 4de771c..d5833a4 100644 --- a/app/src/main/java/com/fankes/miui/notify/ui/activity/base/BaseActivity.kt +++ b/app/src/main/java/com/fankes/miui/notify/ui/activity/base/BaseActivity.kt @@ -27,7 +27,7 @@ package com.fankes.miui.notify.ui.activity.base import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import androidx.core.content.res.ResourcesCompat -import androidx.core.view.ViewCompat +import androidx.core.view.WindowCompat import androidx.viewbinding.ViewBinding import com.fankes.miui.notify.R import com.fankes.miui.notify.utils.factory.isNotSystemInDarkMode @@ -61,7 +61,7 @@ abstract class BaseActivity : AppCompatActivity() { /** 隐藏系统的标题栏 */ supportActionBar?.hide() /** 初始化沉浸状态栏 */ - ViewCompat.getWindowInsetsController(window.decorView)?.apply { + WindowCompat.getInsetsController(window, window.decorView).apply { isAppearanceLightStatusBars = isNotSystemInDarkMode isAppearanceLightNavigationBars = isNotSystemInDarkMode } diff --git a/app/src/main/java/com/fankes/miui/notify/utils/drawable/drawabletoolbox/FlipDrawable.kt b/app/src/main/java/com/fankes/miui/notify/utils/drawable/drawabletoolbox/FlipDrawable.kt index 16daa6d..6de9b20 100755 --- a/app/src/main/java/com/fankes/miui/notify/utils/drawable/drawabletoolbox/FlipDrawable.kt +++ b/app/src/main/java/com/fankes/miui/notify/utils/drawable/drawabletoolbox/FlipDrawable.kt @@ -20,7 +20,7 @@ * * This file is Created by fankes on 2022/1/8. */ -@file:Suppress("DEPRECATION", "CanvasSize") +@file:Suppress("DEPRECATION", "CanvasSize", "OVERRIDE_DEPRECATION") package com.fankes.miui.notify.utils.drawable.drawabletoolbox diff --git a/app/src/main/java/com/fankes/miui/notify/utils/tool/GithubReleaseTool.kt b/app/src/main/java/com/fankes/miui/notify/utils/tool/GithubReleaseTool.kt index e7f82c7..c5af682 100644 --- a/app/src/main/java/com/fankes/miui/notify/utils/tool/GithubReleaseTool.kt +++ b/app/src/main/java/com/fankes/miui/notify/utils/tool/GithubReleaseTool.kt @@ -61,7 +61,7 @@ object GithubReleaseTool { override fun onFailure(call: Call, e: IOException) {} override fun onResponse(call: Call, response: Response) = runInSafe { - JSONObject(response.body?.string() ?: "").apply { + JSONObject(response.body.string()).apply { GithubReleaseBean( name = getString("name"), htmlUrl = getString("html_url"), diff --git a/app/src/main/java/com/fankes/miui/notify/utils/tool/IconRuleManagerTool.kt b/app/src/main/java/com/fankes/miui/notify/utils/tool/IconRuleManagerTool.kt index ca8761f..de38e04 100644 --- a/app/src/main/java/com/fankes/miui/notify/utils/tool/IconRuleManagerTool.kt +++ b/app/src/main/java/com/fankes/miui/notify/utils/tool/IconRuleManagerTool.kt @@ -343,7 +343,7 @@ object IconRuleManagerTool { } override fun onResponse(call: Call, response: Response) { - val bodyString = response.body?.string() ?: "" + val bodyString = response.body.string() (context as? Activity?)?.runOnUiThread { result(true, bodyString) } ?: result(true, bodyString) } }) diff --git a/build.gradle b/build.gradle index 586a0ec..13356ac 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ plugins { - id 'com.android.application' version '7.2.0' apply false - id 'com.android.library' version '7.2.0' apply false - id 'org.jetbrains.kotlin.android' version '1.6.21' apply false + id 'com.android.application' version '7.2.1' apply false + id 'com.android.library' version '7.2.1' apply false + id 'org.jetbrains.kotlin.android' version '1.7.0' apply false } ext { diff --git a/gradle.properties b/gradle.properties index 98bed16..f695f66 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ # http://www.gradle.org/docs/current/userguide/build_environment.html # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +org.gradle.jvmargs=-XX:+UseParallelGC # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects @@ -18,4 +18,6 @@ android.useAndroidX=true # Automatically convert third-party libraries to use AndroidX android.enableJetifier=true # Kotlin code style for this project: "official" or "obsolete": -kotlin.code.style=official \ No newline at end of file +kotlin.code.style=official +# Incremental +kotlin.incremental.useClasspathSnapshot=true \ No newline at end of file