mirror of
https://github.com/revanced/revanced-cli.git
synced 2024-12-04 01:12:54 +01:00
add: missing integrations parameter
This commit is contained in:
parent
4624384f28
commit
967fac48d0
@ -20,11 +20,13 @@ class Main {
|
|||||||
inApk: String,
|
inApk: String,
|
||||||
inSignatures: String,
|
inSignatures: String,
|
||||||
inPatches: String,
|
inPatches: String,
|
||||||
|
integrations: 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(
|
||||||
@ -34,6 +36,8 @@ class Main {
|
|||||||
.toTypedArray()
|
.toTypedArray()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
patcher.addFiles(integrationsFile)
|
||||||
|
|
||||||
PatchLoader.injectPatches(patchesFile)
|
PatchLoader.injectPatches(patchesFile)
|
||||||
val patches = Patches.loadPatches()
|
val patches = Patches.loadPatches()
|
||||||
patcher.addPatches(*patches.map { it() }.toTypedArray())
|
patcher.addPatches(*patches.map { it() }.toTypedArray())
|
||||||
@ -72,19 +76,25 @@ class Main {
|
|||||||
shortName = "p",
|
shortName = "p",
|
||||||
description = "Patches JAR file"
|
description = "Patches JAR file"
|
||||||
).required()
|
).required()
|
||||||
|
val integrations by parser.option(
|
||||||
|
ArgType.String,
|
||||||
|
fullName = "integrations",
|
||||||
|
shortName = "i",
|
||||||
|
description = "Integrations APK file"
|
||||||
|
).required()
|
||||||
val output by parser.option(
|
val output by parser.option(
|
||||||
ArgType.String,
|
ArgType.String,
|
||||||
fullName = "output",
|
fullName = "output",
|
||||||
shortName = "o",
|
shortName = "o",
|
||||||
description = "Output directory"
|
description = "Output directory"
|
||||||
).required()
|
).required()
|
||||||
// TODO: merge dex file
|
|
||||||
|
|
||||||
parser.parse(args)
|
parser.parse(args)
|
||||||
runCLI(
|
runCLI(
|
||||||
apk,
|
apk,
|
||||||
signatures,
|
signatures,
|
||||||
patches,
|
patches,
|
||||||
|
integrations,
|
||||||
output,
|
output,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user