mirror of
https://github.com/fankes/ColorOSNotifyIcon.git
synced 2025-09-06 10:45:49 +08:00
Update Gradle & Kotlin & PlatformSDK
- Update Kotlin version to 1.7.0 - Update Gradle dependencies - Merge legacy code
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'com.android.application'
|
id 'com.android.application'
|
||||||
id 'org.jetbrains.kotlin.android'
|
id 'org.jetbrains.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 {
|
android {
|
||||||
compileSdk 31
|
compileSdk 32
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
debug {
|
debug {
|
||||||
@@ -21,7 +21,7 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.fankes.coloros.notify"
|
applicationId "com.fankes.coloros.notify"
|
||||||
minSdk 29
|
minSdk 29
|
||||||
targetSdk 31
|
targetSdk 32
|
||||||
versionCode rootProject.ext.appVersionCode
|
versionCode rootProject.ext.appVersionCode
|
||||||
versionName rootProject.ext.appVersionName
|
versionName rootProject.ext.appVersionName
|
||||||
|
|
||||||
@@ -63,10 +63,10 @@ dependencies {
|
|||||||
ksp 'com.highcapable.yukihookapi:ksp-xposed:1.0.92'
|
ksp 'com.highcapable.yukihookapi:ksp-xposed:1.0.92'
|
||||||
implementation "com.github.topjohnwu.libsu:core:3.1.2"
|
implementation "com.github.topjohnwu.libsu:core:3.1.2"
|
||||||
implementation 'androidx.annotation:annotation:1.3.0'
|
implementation 'androidx.annotation:annotation:1.3.0'
|
||||||
implementation 'com.squareup.okhttp3:okhttp:4.9.3'
|
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.7'
|
||||||
implementation 'androidx.core:core-ktx:1.7.0'
|
implementation 'androidx.core:core-ktx:1.8.0'
|
||||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
implementation 'androidx.appcompat:appcompat:1.4.2'
|
||||||
implementation 'com.google.android.material:material:1.6.0'
|
implementation 'com.google.android.material:material:1.6.1'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||||
testImplementation 'junit:junit:4.13.2'
|
testImplementation 'junit:junit:4.13.2'
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||||
|
@@ -27,7 +27,7 @@ package com.fankes.coloros.notify.ui.activity.base
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.core.content.res.ResourcesCompat
|
import androidx.core.content.res.ResourcesCompat
|
||||||
import androidx.core.view.ViewCompat
|
import androidx.core.view.WindowCompat
|
||||||
import androidx.viewbinding.ViewBinding
|
import androidx.viewbinding.ViewBinding
|
||||||
import com.fankes.coloros.notify.R
|
import com.fankes.coloros.notify.R
|
||||||
import com.fankes.coloros.notify.utils.factory.isNotSystemInDarkMode
|
import com.fankes.coloros.notify.utils.factory.isNotSystemInDarkMode
|
||||||
@@ -61,7 +61,7 @@ abstract class BaseActivity<VB : ViewBinding> : AppCompatActivity() {
|
|||||||
/** 隐藏系统的标题栏 */
|
/** 隐藏系统的标题栏 */
|
||||||
supportActionBar?.hide()
|
supportActionBar?.hide()
|
||||||
/** 初始化沉浸状态栏 */
|
/** 初始化沉浸状态栏 */
|
||||||
ViewCompat.getWindowInsetsController(window.decorView)?.apply {
|
WindowCompat.getInsetsController(window, window.decorView).apply {
|
||||||
isAppearanceLightStatusBars = isNotSystemInDarkMode
|
isAppearanceLightStatusBars = isNotSystemInDarkMode
|
||||||
isAppearanceLightNavigationBars = isNotSystemInDarkMode
|
isAppearanceLightNavigationBars = isNotSystemInDarkMode
|
||||||
}
|
}
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
*
|
*
|
||||||
* This file is Created by fankes on 2022/1/8.
|
* This file is Created by fankes on 2022/1/8.
|
||||||
*/
|
*/
|
||||||
@file:Suppress("DEPRECATION", "CanvasSize")
|
@file:Suppress("DEPRECATION", "CanvasSize", "OVERRIDE_DEPRECATION")
|
||||||
|
|
||||||
package com.fankes.coloros.notify.utils.drawable.drawabletoolbox
|
package com.fankes.coloros.notify.utils.drawable.drawabletoolbox
|
||||||
|
|
||||||
|
@@ -61,7 +61,7 @@ object GithubReleaseTool {
|
|||||||
override fun onFailure(call: Call, e: IOException) {}
|
override fun onFailure(call: Call, e: IOException) {}
|
||||||
|
|
||||||
override fun onResponse(call: Call, response: Response) = runInSafe {
|
override fun onResponse(call: Call, response: Response) = runInSafe {
|
||||||
JSONObject(response.body?.string() ?: "").apply {
|
JSONObject(response.body.string()).apply {
|
||||||
GithubReleaseBean(
|
GithubReleaseBean(
|
||||||
name = getString("name"),
|
name = getString("name"),
|
||||||
htmlUrl = getString("html_url"),
|
htmlUrl = getString("html_url"),
|
||||||
|
@@ -343,7 +343,7 @@ object IconRuleManagerTool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onResponse(call: Call, response: Response) {
|
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)
|
(context as? Activity?)?.runOnUiThread { result(true, bodyString) } ?: result(true, bodyString)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'com.android.application' version '7.2.0' apply false
|
id 'com.android.application' version '7.2.1' apply false
|
||||||
id 'com.android.library' version '7.2.0' apply false
|
id 'com.android.library' version '7.2.1' apply false
|
||||||
id 'org.jetbrains.kotlin.android' version '1.6.21' apply false
|
id 'org.jetbrains.kotlin.android' version '1.7.0' apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||||
# Specifies the JVM arguments used for the daemon process.
|
# Specifies the JVM arguments used for the daemon process.
|
||||||
# The setting is particularly useful for tweaking memory settings.
|
# 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.
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
# This option should only be used with decoupled projects. More details, visit
|
# 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
|
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||||
@@ -21,3 +21,5 @@ kotlin.code.style=official
|
|||||||
# resources declared in the library itself and none from the library's dependencies,
|
# resources declared in the library itself and none from the library's dependencies,
|
||||||
# thereby reducing the size of the R class for that library
|
# thereby reducing the size of the R class for that library
|
||||||
android.nonTransitiveRClass=true
|
android.nonTransitiveRClass=true
|
||||||
|
# Incremental
|
||||||
|
kotlin.incremental.useClasspathSnapshot=true
|
Reference in New Issue
Block a user