mirror of
https://github.com/revanced/revanced-cli.git
synced 2024-11-12 06:39:24 +01:00
feat: --include
option (#76)
This commit is contained in:
parent
585d77ce80
commit
57a1e7c27f
@ -57,6 +57,9 @@ internal object MainCommand : Runnable {
|
|||||||
@Option(names = ["-e", "--exclude"], description = ["Explicitly exclude patches"])
|
@Option(names = ["-e", "--exclude"], description = ["Explicitly exclude patches"])
|
||||||
var excludedPatches = arrayOf<String>()
|
var excludedPatches = arrayOf<String>()
|
||||||
|
|
||||||
|
@Option(names = ["-i", "--include"], description = ["Include patches"])
|
||||||
|
var includedPatches = arrayOf<String>()
|
||||||
|
|
||||||
@Option(names = ["-r", "--resource-patcher"], description = ["Disable patching resources"])
|
@Option(names = ["-r", "--resource-patcher"], description = ["Disable patching resources"])
|
||||||
var disableResourcePatching: Boolean = false
|
var disableResourcePatching: Boolean = false
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ fun Patcher.addPatchesFiltered(
|
|||||||
if (excludePatches && args.excludedPatches.contains(patchName)) {
|
if (excludePatches && args.excludedPatches.contains(patchName)) {
|
||||||
logger.info("$prefix: Explicitly excluded")
|
logger.info("$prefix: Explicitly excluded")
|
||||||
return@patch
|
return@patch
|
||||||
} else if (!patch.include) {
|
} else if (!patch.include && !args.includedPatches.contains(patchName)) {
|
||||||
logger.info("$prefix: Explicitly excluded")
|
logger.info("$prefix: Explicitly excluded")
|
||||||
return@patch
|
return@patch
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user