From 288cfc3f62fd545d48902b5557b8b02723342b07 Mon Sep 17 00:00:00 2001 From: Aistra Date: Mon, 9 Sep 2024 17:55:43 +0800 Subject: [PATCH] build!: bump target sdk version to 35 --- app/build.gradle.kts | 36 +++++++++---------- .../hail/extensions/PackageInfoExtensions.kt | 2 +- .../kotlin/com/aistra/hail/utils/HDhizuku.kt | 4 +-- build.gradle.kts | 2 +- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 5bcfc940..c10b4f18 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -5,15 +5,15 @@ plugins { android { namespace = "com.aistra.hail" - buildToolsVersion = "34.0.0" - compileSdk = 34 + buildToolsVersion = "35.0.0" + compileSdk = 35 defaultConfig { applicationId = "com.aistra.hail" minSdk = 23 - targetSdk = 34 - versionCode = 32 - versionName = "1.8.1" + targetSdk = 35 + versionCode = 33 + versionName = "1.9.0" } // Do not compress the dex files, so the apk can be imported as a privileged app @@ -50,11 +50,11 @@ android { } } compileOptions { - sourceCompatibility(JavaVersion.VERSION_11) - targetCompatibility(JavaVersion.VERSION_11) + sourceCompatibility(JavaVersion.VERSION_17) + targetCompatibility(JavaVersion.VERSION_17) } kotlinOptions { - jvmTarget = "11" + jvmTarget = "17" } androidResources { generateLocaleConfig = true @@ -70,25 +70,25 @@ android { } dependencies { - implementation("androidx.appcompat:appcompat:1.6.1") + implementation("androidx.appcompat:appcompat:1.7.0") implementation("androidx.biometric:biometric-ktx:1.2.0-alpha05") implementation("androidx.constraintlayout:constraintlayout:2.1.4") - implementation("androidx.core:core-ktx:1.12.0") - implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.7.0") - implementation("androidx.navigation:navigation-fragment-ktx:2.7.7") - implementation("androidx.navigation:navigation-ui-ktx:2.7.7") + implementation("androidx.core:core-ktx:1.13.1") + implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.8.5") + implementation("androidx.navigation:navigation-fragment-ktx:2.8.0") + implementation("androidx.navigation:navigation-ui-ktx:2.8.0") implementation("androidx.preference:preference-ktx:1.2.1") implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0") - implementation("androidx.work:work-runtime-ktx:2.9.0") + implementation("androidx.work:work-runtime-ktx:2.9.1") implementation("com.belerweb:pinyin4j:2.5.1") - implementation("com.google.android.material:material:1.11.0") + implementation("com.google.android.material:material:1.12.0") implementation("dev.chrisbanes.insetter:insetter:0.6.1") implementation("dev.rikka.rikkax.preference:simplemenu-preference:1.0.3") implementation("dev.rikka.shizuku:api:13.1.5") implementation("dev.rikka.shizuku:provider:13.1.5") - implementation("io.github.iamr0s:Dhizuku-API:2.4") + implementation("io.github.iamr0s:Dhizuku-API:2.5.3") implementation("me.zhanghai.android.appiconloader:appiconloader:1.5.0") - implementation("org.apache.commons:commons-text:1.11.0") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0") + implementation("org.apache.commons:commons-text:1.12.0") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1") implementation("org.lsposed.hiddenapibypass:hiddenapibypass:4.3") } \ No newline at end of file diff --git a/app/src/main/kotlin/com/aistra/hail/extensions/PackageInfoExtensions.kt b/app/src/main/kotlin/com/aistra/hail/extensions/PackageInfoExtensions.kt index 10f7953a..cd2c7626 100644 --- a/app/src/main/kotlin/com/aistra/hail/extensions/PackageInfoExtensions.kt +++ b/app/src/main/kotlin/com/aistra/hail/extensions/PackageInfoExtensions.kt @@ -9,6 +9,6 @@ import com.aistra.hail.HailApp.Companion.app * The name of the file when exported to sd card, in the format `AppName-VersionName-VersionNumber.apk`. * */ val PackageInfo.exportFileName - get() = "${applicationInfo.loadLabel(app.packageManager)}-$versionName-${ + get() = "${applicationInfo?.loadLabel(app.packageManager) ?: packageName}-$versionName-${ PackageInfoCompat.getLongVersionCode(this) }.apk" \ No newline at end of file diff --git a/app/src/main/kotlin/com/aistra/hail/utils/HDhizuku.kt b/app/src/main/kotlin/com/aistra/hail/utils/HDhizuku.kt index 9e64b9c2..1eb288db 100644 --- a/app/src/main/kotlin/com/aistra/hail/utils/HDhizuku.kt +++ b/app/src/main/kotlin/com/aistra/hail/utils/HDhizuku.kt @@ -57,8 +57,8 @@ object HDhizuku { if (HTarget.P) HiddenApiBypass.setHiddenApiExemptions("") val mPackageName = installer::class.java.getDeclaredField("mInstallerPackageName") mPackageName.isAccessible = true - if (mPackageName.get(installer) != DhizukuVariables.PACKAGE_NAME) { - mPackageName.set(installer, DhizukuVariables.PACKAGE_NAME) + if (mPackageName.get(installer) != DhizukuVariables.OFFICIAL_PACKAGE_NAME) { + mPackageName.set(installer, DhizukuVariables.OFFICIAL_PACKAGE_NAME) val mInstaller = installer::class.java.getDeclaredField("mInstaller") mInstaller.isAccessible = true val origin = mInstaller.get(installer) diff --git a/build.gradle.kts b/build.gradle.kts index eccb1cbd..e3b93205 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id("com.android.application") version "8.2.0" apply false + id("com.android.application") version "8.5.2" apply false kotlin("android") version "2.0.0" apply false }