mirror of
https://github.com/revanced/revanced-cli.git
synced 2024-12-05 01:42:54 +01:00
fix: make integrations optional
This commit is contained in:
parent
967fac48d0
commit
bea8b829c7
@ -20,13 +20,12 @@ class Main {
|
|||||||
inApk: String,
|
inApk: String,
|
||||||
inSignatures: String,
|
inSignatures: String,
|
||||||
inPatches: String,
|
inPatches: String,
|
||||||
integrations: String,
|
inIntegrations: String?,
|
||||||
inOutput: String,
|
inOutput: String,
|
||||||
) {
|
) {
|
||||||
val apk = Preconditions.isFile(inApk)
|
val apk = Preconditions.isFile(inApk)
|
||||||
val signatures = Preconditions.isFile(inSignatures)
|
val signatures = Preconditions.isFile(inSignatures)
|
||||||
val patchesFile = Preconditions.isFile(inPatches)
|
val patchesFile = Preconditions.isFile(inPatches)
|
||||||
val integrationsFile = Preconditions.isFile(integrations)
|
|
||||||
val output = Preconditions.isDirectory(inOutput)
|
val output = Preconditions.isDirectory(inOutput)
|
||||||
|
|
||||||
val patcher = Patcher(
|
val patcher = Patcher(
|
||||||
@ -36,7 +35,10 @@ class Main {
|
|||||||
.toTypedArray()
|
.toTypedArray()
|
||||||
)
|
)
|
||||||
|
|
||||||
patcher.addFiles(integrationsFile)
|
inIntegrations?.let {
|
||||||
|
val integrations = Preconditions.isFile(it)
|
||||||
|
patcher.addFiles(integrations)
|
||||||
|
}
|
||||||
|
|
||||||
PatchLoader.injectPatches(patchesFile)
|
PatchLoader.injectPatches(patchesFile)
|
||||||
val patches = Patches.loadPatches()
|
val patches = Patches.loadPatches()
|
||||||
@ -81,7 +83,7 @@ class Main {
|
|||||||
fullName = "integrations",
|
fullName = "integrations",
|
||||||
shortName = "i",
|
shortName = "i",
|
||||||
description = "Integrations APK file"
|
description = "Integrations APK file"
|
||||||
).required()
|
)
|
||||||
val output by parser.option(
|
val output by parser.option(
|
||||||
ArgType.String,
|
ArgType.String,
|
||||||
fullName = "output",
|
fullName = "output",
|
||||||
|
Loading…
Reference in New Issue
Block a user