diff --git a/src/main/kotlin/app/revanced/cli/command/MainCommand.kt b/src/main/kotlin/app/revanced/cli/command/MainCommand.kt index d7eeace..4b03204 100644 --- a/src/main/kotlin/app/revanced/cli/command/MainCommand.kt +++ b/src/main/kotlin/app/revanced/cli/command/MainCommand.kt @@ -67,6 +67,9 @@ internal object MainCommand : Runnable { @Option(names = ["-e", "--exclude"], description = ["Explicitly exclude patches"]) var excludedPatches = arrayOf() + @Option(names = ["--exclusive"], description = ["Exclusively include patches"]) + var defaultExclude = false + @Option(names = ["-i", "--include"], description = ["Include patches"]) var includedPatches = arrayOf() diff --git a/src/main/kotlin/app/revanced/cli/patcher/Patcher.kt b/src/main/kotlin/app/revanced/cli/patcher/Patcher.kt index 3250166..e006025 100644 --- a/src/main/kotlin/app/revanced/cli/patcher/Patcher.kt +++ b/src/main/kotlin/app/revanced/cli/patcher/Patcher.kt @@ -16,7 +16,7 @@ internal object Patcher { // merge files like necessary integrations patcher.mergeFiles() // add patches, but filter incompatible or excluded patches - patcher.addPatchesFiltered(excludePatches = args.excludedPatches.isNotEmpty()) + patcher.addPatchesFiltered() // apply patches patcher.applyPatchesVerbose() diff --git a/src/main/kotlin/app/revanced/utils/patcher/Patcher.kt b/src/main/kotlin/app/revanced/utils/patcher/Patcher.kt index 8c9005f..3eb2e11 100644 --- a/src/main/kotlin/app/revanced/utils/patcher/Patcher.kt +++ b/src/main/kotlin/app/revanced/utils/patcher/Patcher.kt @@ -11,9 +11,7 @@ import app.revanced.patcher.extensions.PatchExtensions.patchName import app.revanced.patcher.patch.Patch import app.revanced.patcher.util.patch.implementation.JarPatchBundle -fun Patcher.addPatchesFiltered( - excludePatches: Boolean = false -) { +fun Patcher.addPatchesFiltered() { val packageName = this.data.packageMetadata.packageName val packageVersion = this.data.packageMetadata.packageVersion