mirror of
https://github.com/revanced/revanced-cli.git
synced 2024-12-04 17:32:53 +01:00
feat: --exclusive
switch (#78)
This commit is contained in:
parent
93a4787780
commit
8e91c12c5e
@ -67,6 +67,9 @@ internal object MainCommand : Runnable {
|
||||
@Option(names = ["-e", "--exclude"], description = ["Explicitly exclude patches"])
|
||||
var excludedPatches = arrayOf<String>()
|
||||
|
||||
@Option(names = ["--exclusive"], description = ["Exclusively include patches"])
|
||||
var defaultExclude = false
|
||||
|
||||
@Option(names = ["-i", "--include"], description = ["Include patches"])
|
||||
var includedPatches = arrayOf<String>()
|
||||
|
||||
|
@ -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()
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user