mirror of
https://github.com/ReVanced/revanced-cli.git
synced 2026-01-19 09:23:58 +00:00
build: add properties resource file
This commit is contained in:
@@ -1,29 +1,29 @@
|
||||
package app.revanced.cli.command
|
||||
|
||||
import app.revanced.utils.adb.AdbManager
|
||||
import picocli.CommandLine
|
||||
import picocli.CommandLine.*
|
||||
import picocli.CommandLine.Help.Visibility.ALWAYS
|
||||
|
||||
|
||||
@CommandLine.Command(
|
||||
@Command(
|
||||
name = "uninstall",
|
||||
description = ["Uninstall a patched package from the devices with the supplied ADB device serials"]
|
||||
)
|
||||
class UninstallCommand : Runnable {
|
||||
@CommandLine.Parameters(
|
||||
internal object UninstallCommand : Runnable {
|
||||
@Parameters(
|
||||
description = ["ADB device serials"],
|
||||
arity = "1..*"
|
||||
)
|
||||
lateinit var deviceSerials: Array<String>
|
||||
|
||||
@CommandLine.Option(
|
||||
@Option(
|
||||
names = ["-p", "--package-name"],
|
||||
description = ["Package name to uninstall"],
|
||||
required = true
|
||||
)
|
||||
lateinit var packageName: String
|
||||
|
||||
@CommandLine.Option(
|
||||
@Option(
|
||||
names = ["-u", "--unmount"],
|
||||
description = ["Uninstall by unmounting the patched package"],
|
||||
showDefaultValue = ALWAYS
|
||||
@@ -33,12 +33,12 @@ class UninstallCommand : Runnable {
|
||||
override fun run() = try {
|
||||
deviceSerials.forEach {deviceSerial ->
|
||||
if (unmount) {
|
||||
AdbManager.RootAdbManager(deviceSerial, MainCommand.logger)
|
||||
AdbManager.RootAdbManager(deviceSerial, logger)
|
||||
} else {
|
||||
AdbManager.UserAdbManager(deviceSerial, MainCommand.logger)
|
||||
AdbManager.UserAdbManager(deviceSerial, logger)
|
||||
}.uninstall(packageName)
|
||||
}
|
||||
} catch (e: AdbManager.DeviceNotFoundException) {
|
||||
MainCommand.logger.error(e.toString())
|
||||
logger.error(e.toString())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user