mirror of
https://github.com/revanced/revanced-cli.git
synced 2025-01-21 00:17:32 +01:00
Merge branch 'picocli' into adb-deploy
# Conflicts: # src/main/kotlin/app/revanced/cli/MainCommand.kt
This commit is contained in:
commit
3776ab9a0b
@ -20,7 +20,7 @@ repositories {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val patchesDependency = "app.revanced:revanced-patches:+"
|
val patchesDependency = "app.revanced:revanced-patches:1.0.0-dev.4"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(kotlin("stdlib"))
|
implementation(kotlin("stdlib"))
|
||||||
@ -42,7 +42,7 @@ tasks {
|
|||||||
exclude(dependency(patchesDependency))
|
exclude(dependency(patchesDependency))
|
||||||
}
|
}
|
||||||
manifest {
|
manifest {
|
||||||
attributes("Main-Class" to "app.revanced.cli.Main")
|
attributes("Main-Class" to "app.revanced.cli.MainKt")
|
||||||
attributes("Implementation-Title" to project.name)
|
attributes("Implementation-Title" to project.name)
|
||||||
attributes("Implementation-Version" to project.version)
|
attributes("Implementation-Version" to project.version)
|
||||||
}
|
}
|
||||||
|
7
src/main/kotlin/app/revanced/cli/Main.kt
Normal file
7
src/main/kotlin/app/revanced/cli/Main.kt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
package app.revanced.cli
|
||||||
|
|
||||||
|
import picocli.CommandLine
|
||||||
|
|
||||||
|
internal fun main(args: Array<String>) {
|
||||||
|
CommandLine(MainCommand).execute(*args)
|
||||||
|
}
|
@ -2,7 +2,6 @@ package app.revanced.cli
|
|||||||
|
|
||||||
import app.revanced.patch.PatchLoader
|
import app.revanced.patch.PatchLoader
|
||||||
import app.revanced.patch.Patches
|
import app.revanced.patch.Patches
|
||||||
import app.revanced.utils.adb.Adb
|
|
||||||
import picocli.CommandLine
|
import picocli.CommandLine
|
||||||
import picocli.CommandLine.*
|
import picocli.CommandLine.*
|
||||||
import java.io.File
|
import java.io.File
|
||||||
@ -11,15 +10,15 @@ import java.io.File
|
|||||||
name = "ReVanced-CLI", version = ["1.0.0"], mixinStandardHelpOptions = true
|
name = "ReVanced-CLI", version = ["1.0.0"], mixinStandardHelpOptions = true
|
||||||
)
|
)
|
||||||
internal object MainCommand : Runnable {
|
internal object MainCommand : Runnable {
|
||||||
|
@Option(names = ["-p", "--patches"], description = ["One or more bundles of patches"])
|
||||||
|
internal var patchBundles = arrayOf<File>()
|
||||||
|
|
||||||
@Parameters(
|
@Parameters(
|
||||||
paramLabel = "INCLUDE",
|
paramLabel = "INCLUDE",
|
||||||
description = ["Which patches to include. If none is specified, all compatible patches will be included"]
|
description = ["Which patches to include. If none is specified, all compatible patches will be included"]
|
||||||
)
|
)
|
||||||
internal var includedPatches = arrayOf<String>()
|
internal var includedPatches = arrayOf<String>()
|
||||||
|
|
||||||
@Option(names = ["-p", "--patches"], description = ["One or more bundles of patches"])
|
|
||||||
internal var patchBundles = arrayOf<File>()
|
|
||||||
|
|
||||||
@Option(names = ["-c", "--cache"], description = ["Output resource cache directory"], required = true)
|
@Option(names = ["-c", "--cache"], description = ["Output resource cache directory"], required = true)
|
||||||
internal lateinit var cacheDirectory: String
|
internal lateinit var cacheDirectory: String
|
||||||
|
|
||||||
@ -75,8 +74,4 @@ internal object MainCommand : Runnable {
|
|||||||
).deploy()
|
).deploy()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
internal fun main(args: Array<String>) {
|
|
||||||
CommandLine(MainCommand).execute(*args)
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user