From 6670d89c74d3690e938a827e447cceace210730b Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sun, 22 Oct 2023 23:38:34 +0200 Subject: [PATCH] build(Needs bump): Bump dependencies to support new patch options fields --- gradle/libs.versions.toml | 6 +++--- .../app/revanced/cli/command/ListPatchesCommand.kt | 12 ++++++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f34e81d6..0e5ee070 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,14 +3,14 @@ shadow = "8.1.1" kotlin-test = "1.8.20-RC" kotlinx-coroutines-core = "1.7.3" picocli = "4.7.3" -revanced-patcher = "17.0.0" -revanced-library = "1.1.4" +revanced-patcher = "18.0.0" +revanced-library = "1.1.5" [libraries] kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin-test" } kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines-core" } picocli = { module = "info.picocli:picocli", version.ref = "picocli" } -revanced-patcher = { module = "app.revanced.revanced-patcher:revanced-patcher", version.ref = "revanced-patcher" } +revanced-patcher = { module = "app.revanced:revanced-patcher", version.ref = "revanced-patcher" } revanced-library = { module = "app.revanced:revanced-library", version.ref = "revanced-library" } [plugins] diff --git a/src/main/kotlin/app/revanced/cli/command/ListPatchesCommand.kt b/src/main/kotlin/app/revanced/cli/command/ListPatchesCommand.kt index 3c3aac24..67e92c10 100644 --- a/src/main/kotlin/app/revanced/cli/command/ListPatchesCommand.kt +++ b/src/main/kotlin/app/revanced/cli/command/ListPatchesCommand.kt @@ -58,12 +58,16 @@ internal object ListPatchesCommand : Runnable { fun PatchOption<*>.buildString() = buildString { appendLine("Title: $title") - appendLine("Description: $description") - - value?.let { + description?.let { appendLine("Description: $it") } + default?.let { appendLine("Key: $key") - append("Value: $it") + append("Default: $it") } ?: append("Key: $key") + + values?.let { values -> + appendLine("\nValid values:") + append(values.map { "${it.value} (${it.key})" }.joinToString("\n").prependIndent("\t")) + } } fun Patch<*>.buildString() = buildString {