From 8c2aeff2cf5564f5229bc685ac207ca9ad2151fd Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Thu, 15 Dec 2022 23:24:44 +0100 Subject: [PATCH 1/3] build: exclude Bouncy Castle dependency from minimizing --- build.gradle.kts | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle.kts b/build.gradle.kts index 165f6c6..44954e0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -43,6 +43,7 @@ tasks { } minimize { exclude(dependency("org.jetbrains.kotlin:.*")) + exclude(dependency("org.bouncycastle:.*")) } } // Dummy task to fix the Gradle semantic-release plugin. From ad81a1b656586226f8b7b8d1123c52b0f3f2e6f7 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Thu, 15 Dec 2022 23:37:11 +0100 Subject: [PATCH 2/3] fix: don't log when package is incompatible and `exclusive` option is used --- .../app/revanced/cli/command/MainCommand.kt | 2 +- .../app/revanced/utils/patcher/Patcher.kt | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/main/kotlin/app/revanced/cli/command/MainCommand.kt b/src/main/kotlin/app/revanced/cli/command/MainCommand.kt index aff17a0..c751933 100644 --- a/src/main/kotlin/app/revanced/cli/command/MainCommand.kt +++ b/src/main/kotlin/app/revanced/cli/command/MainCommand.kt @@ -87,7 +87,7 @@ internal object MainCommand : Runnable { names = ["--exclusive"], description = ["Only installs the patches you include, not including any patch by default"] ) - var defaultExclude = false + var exclusive = false @Option(names = ["-i", "--include"], description = ["Include patches"]) var includedPatches = arrayOf() diff --git a/src/main/kotlin/app/revanced/utils/patcher/Patcher.kt b/src/main/kotlin/app/revanced/utils/patcher/Patcher.kt index f9912ab..c6e86ce 100644 --- a/src/main/kotlin/app/revanced/utils/patcher/Patcher.kt +++ b/src/main/kotlin/app/revanced/utils/patcher/Patcher.kt @@ -18,18 +18,9 @@ fun Patcher.addPatchesFiltered(allPatches: List>>) { allPatches.forEach patchLoop@{ patch -> val compatiblePackages = patch.compatiblePackages val patchName = patch.patchName - - val prefix = "Skipping $patchName" - val args = MainCommand.args.patchArgs?.patchingArgs!! - if (args.excludedPatches.contains(patchName)) { - logger.info("$prefix: Manually excluded") - return@patchLoop - } else if ((!patch.include || args.defaultExclude) && !args.includedPatches.contains(patchName)) { - logger.info("$prefix: Excluded by default") - return@patchLoop - } + val prefix = "Skipping $patchName" if (compatiblePackages == null) logger.trace("$patchName: No constraint on packages.") else { @@ -51,6 +42,14 @@ fun Patcher.addPatchesFiltered(allPatches: List>>) { } } + if (args.excludedPatches.contains(patchName)) { + logger.info("$prefix: Manually excluded") + return@patchLoop + } else if ((!patch.include || args.exclusive) && !args.includedPatches.contains(patchName)) { + logger.info("$prefix: Excluded by default") + return@patchLoop + } + logger.trace("Adding $patchName") includedPatches.add(patch) } From d9a1fd33ed8b3e4614ff801b506ea98c7b064e17 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 15 Dec 2022 22:43:16 +0000 Subject: [PATCH 3/3] chore(release): 2.18.1-dev.1 [skip ci] ## [2.18.1-dev.1](https://github.com/revanced/revanced-cli/compare/v2.18.0...v2.18.1-dev.1) (2022-12-15) ### Bug Fixes * don't log when package is incompatible and `exclusive` option is used ([ad81a1b](https://github.com/revanced/revanced-cli/commit/ad81a1b656586226f8b7b8d1123c52b0f3f2e6f7)) --- CHANGELOG.md | 7 +++++++ gradle.properties | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e63444b..83da987 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [2.18.1-dev.1](https://github.com/revanced/revanced-cli/compare/v2.18.0...v2.18.1-dev.1) (2022-12-15) + + +### Bug Fixes + +* don't log when package is incompatible and `exclusive` option is used ([ad81a1b](https://github.com/revanced/revanced-cli/commit/ad81a1b656586226f8b7b8d1123c52b0f3f2e6f7)) + # [2.18.0](https://github.com/revanced/revanced-cli/compare/v2.17.0...v2.18.0) (2022-12-15) diff --git a/gradle.properties b/gradle.properties index 940fa14..fc6bb19 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ kotlin.code.style = official -version = 2.18.0 +version = 2.18.1-dev.1