diff --git a/app/build.gradle.kts b/app/build.gradle.kts index ca8048bb..7fc625e3 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -7,7 +7,6 @@ import java.io.PrintStream val minSdkVer: Int by rootProject.extra val targetSdkVer: Int by rootProject.extra -val buildToolsVer: String by rootProject.extra val appVerName: String by rootProject.extra val appVerCode: Int by rootProject.extra @@ -29,7 +28,6 @@ plugins { android { compileSdk = targetSdkVer - buildToolsVersion = buildToolsVer buildFeatures { viewBinding = true @@ -132,23 +130,23 @@ androidComponents.onVariants { v -> } dependencies { - implementation("com.drakeet.about:about:2.4.1") + implementation("com.drakeet.about:about:2.5.0") implementation("com.drakeet.multitype:multitype:4.3.0") implementation("com.scwang.smart:refresh-layout-kernel:2.0.3") implementation("com.scwang.smart:refresh-header-material:2.0.3") implementation("com.github.kyuubiran:EzXHelper:0.4.1") implementation("com.github.topjohnwu.libsu:core:3.1.2") - implementation("com.google.code.gson:gson:2.8.8") + implementation("com.google.code.gson:gson:2.8.9") implementation("com.google.android.material:material:1.4.0") - implementation("com.squareup.okhttp3:okhttp:5.0.0-alpha.2") - implementation("androidx.appcompat:appcompat:1.3.1") + implementation("com.squareup.okhttp3:okhttp:5.0.0-alpha.3") + implementation("androidx.appcompat:appcompat:1.4.0") implementation("androidx.preference:preference-ktx:1.1.1") - implementation("androidx.fragment:fragment-ktx:1.4.0-alpha10") - implementation("androidx.work:work-runtime-ktx:2.7.0") - implementation("com.google.android.gms:play-services-ads:20.4.0") - implementation("com.google.firebase:firebase-analytics-ktx:19.0.2") + implementation("androidx.fragment:fragment-ktx:1.4.0") + implementation("androidx.work:work-runtime-ktx:2.7.1") + implementation("com.google.android.gms:play-services-ads:20.5.0") + implementation("com.google.firebase:firebase-analytics-ktx:20.0.2") compileOnly("de.robv.android.xposed:api:82") compileOnly("de.robv.android.xposed:api:82:sources") -} \ No newline at end of file +} diff --git a/app/src/main/assets/extension.zip b/app/src/main/assets/extension.zip index fcaa1196..f975c3f7 100644 Binary files a/app/src/main/assets/extension.zip and b/app/src/main/assets/extension.zip differ diff --git a/app/src/main/java/com/tsng/hidemyapplist/app/ui/activities/MainActivity.kt b/app/src/main/java/com/tsng/hidemyapplist/app/ui/activities/MainActivity.kt index 5a05adcc..5ac4b203 100644 --- a/app/src/main/java/com/tsng/hidemyapplist/app/ui/activities/MainActivity.kt +++ b/app/src/main/java/com/tsng/hidemyapplist/app/ui/activities/MainActivity.kt @@ -1,6 +1,7 @@ package com.tsng.hidemyapplist.app.ui.activities import android.annotation.SuppressLint +import android.content.DialogInterface import android.content.Intent import android.content.pm.PackageManager import android.net.Uri @@ -115,23 +116,26 @@ class MainActivity : AppCompatActivity(), View.OnClickListener { override fun onClick(v: View) { when (v.id) { R.id.menu_install_extension -> { + val listener: (DialogInterface, Int) -> Unit = { dialog, which -> + val flavor = if (which == DialogInterface.BUTTON_POSITIVE) "Zygisk" else "Riru" + val zipFile = File("$cacheDir/$flavor-HideMyApplist.zip") + assets.open("extension.zip").use { fis -> + zipFile.outputStream().use { + fis.copyTo(it) + } + } + + dialog.dismiss() + ShellDialog(this) + .setCommands("su --mount-master -c magisk --install-module ${zipFile.absolutePath}") + .create() + } MaterialAlertDialogBuilder(this) .setTitle(R.string.install_magisk_extension_title) .setMessage(R.string.install_magisk_extension_message) - .setNegativeButton(android.R.string.cancel, null) - .setPositiveButton(android.R.string.ok) { dialog, _ -> - val zipFile = File("$cacheDir/extension.zip") - assets.open("extension.zip").use { fis -> - zipFile.outputStream().use { - fis.copyTo(it) - } - } - - dialog.dismiss() - ShellDialog(this) - .setCommands("su --mount-master -c magisk --install-module ${zipFile.absolutePath}") - .create() - } + .setNeutralButton(android.R.string.cancel, null) + .setNegativeButton("Riru", listener) + .setPositiveButton("Zygisk", listener) .show() } R.id.menu_detection_test -> { @@ -214,4 +218,4 @@ class MainActivity : AppCompatActivity(), View.OnClickListener { } } } -} \ No newline at end of file +} diff --git a/build.gradle.kts b/build.gradle.kts index 6c04a051..f8aa95f7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,14 @@ +buildscript { + repositories { + google() + mavenCentral() + } + dependencies { + classpath("com.android.tools.build:gradle:7.0.4") + classpath("com.google.gms:google-services:4.3.10") + } +} + fun String.execute(currentWorkingDir: File = file("./")): String { val byteOut = java.io.ByteArrayOutputStream() project.exec { @@ -10,11 +21,10 @@ fun String.execute(currentWorkingDir: File = file("./")): String { val minSdkVer by extra(24) val targetSdkVer by extra(32) -val buildToolsVer by extra("32.0.0") -val appVerName by extra("2.3.1") -val appVerCode by extra(72) -val serviceVer by extra(72) +val appVerName by extra("2.3.2") +val appVerCode by extra(73) +val serviceVer by extra(73) val minExtensionVer by extra(35) val minBackupVer by extra(65) @@ -23,4 +33,4 @@ val gitCommitHash by extra("git rev-parse --verify --short HEAD".execute()) tasks.register("clean", Delete::class) { delete(rootProject.buildDir) -} \ No newline at end of file +} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2b050708..f3187dec 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sat Sep 11 23:23:44 CST 2021 +#Sun Jan 09 16:21:31 CST 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/settings.gradle.kts b/settings.gradle.kts index e1bf789b..dc040b5b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,16 +1,3 @@ -pluginManagement { - repositories { - gradlePluginPortal() - google() - mavenCentral() - } - plugins { - id("com.android.application").version("7.0.4") - id("com.android.library").version("7.0.4") - id("org.jetbrains.kotlin.android").version("1.5.31") - } -} - dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { @@ -22,16 +9,19 @@ dependencyResolutionManagement { } } -buildscript { +pluginManagement { repositories { + gradlePluginPortal() google() mavenCentral() } - dependencies { - classpath("com.google.gms:google-services:4.3.10") + plugins { + id("com.android.application").version("7.0.4") + id("com.android.library").version("7.0.4") + id("org.jetbrains.kotlin.android").version("1.6.0") } } rootProject.name = "Hide My Applist" -include(":app") \ No newline at end of file +include(":app")