Skip to content

Commit 8e91c12

Browse files
authored
feat: --exclusive switch (ReVanced#78)
1 parent 93a4787 commit 8e91c12

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/main/kotlin/app/revanced/cli/command/MainCommand.kt

+3
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ internal object MainCommand : Runnable {
6767
@Option(names = ["-e", "--exclude"], description = ["Explicitly exclude patches"])
6868
var excludedPatches = arrayOf<String>()
6969

70+
@Option(names = ["--exclusive"], description = ["Exclusively include patches"])
71+
var defaultExclude = false
72+
7073
@Option(names = ["-i", "--include"], description = ["Include patches"])
7174
var includedPatches = arrayOf<String>()
7275

src/main/kotlin/app/revanced/cli/patcher/Patcher.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ internal object Patcher {
1616
// merge files like necessary integrations
1717
patcher.mergeFiles()
1818
// add patches, but filter incompatible or excluded patches
19-
patcher.addPatchesFiltered(excludePatches = args.excludedPatches.isNotEmpty())
19+
patcher.addPatchesFiltered()
2020
// apply patches
2121
patcher.applyPatchesVerbose()
2222

src/main/kotlin/app/revanced/utils/patcher/Patcher.kt

+1-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ import app.revanced.patcher.extensions.PatchExtensions.patchName
1111
import app.revanced.patcher.patch.Patch
1212
import app.revanced.patcher.util.patch.implementation.JarPatchBundle
1313

14-
fun Patcher.addPatchesFiltered(
15-
excludePatches: Boolean = false
16-
) {
14+
fun Patcher.addPatchesFiltered() {
1715
val packageName = this.data.packageMetadata.packageName
1816
val packageVersion = this.data.packageMetadata.packageVersion
1917

0 commit comments

Comments
 (0)