diff --git a/build.gradle.kts b/build.gradle.kts index b4e3ea6..1b22dc1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -20,7 +20,7 @@ repositories { } } -val patchesDependency = "app.revanced:revanced-patches:+" +val patchesDependency = "app.revanced:revanced-patches:1.0.0-dev.4" dependencies { implementation(kotlin("stdlib")) @@ -42,7 +42,7 @@ tasks { exclude(dependency(patchesDependency)) } 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-Version" to project.version) } diff --git a/src/main/kotlin/app/revanced/cli/Main.kt b/src/main/kotlin/app/revanced/cli/Main.kt new file mode 100644 index 0000000..f62f798 --- /dev/null +++ b/src/main/kotlin/app/revanced/cli/Main.kt @@ -0,0 +1,7 @@ +package app.revanced.cli + +import picocli.CommandLine + +internal fun main(args: Array) { + CommandLine(MainCommand).execute(*args) +} \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/cli/MainCommand.kt b/src/main/kotlin/app/revanced/cli/MainCommand.kt index 57a4c36..659f31d 100644 --- a/src/main/kotlin/app/revanced/cli/MainCommand.kt +++ b/src/main/kotlin/app/revanced/cli/MainCommand.kt @@ -2,7 +2,6 @@ package app.revanced.cli import app.revanced.patch.PatchLoader import app.revanced.patch.Patches -import app.revanced.utils.adb.Adb import picocli.CommandLine import picocli.CommandLine.* import java.io.File @@ -11,15 +10,15 @@ import java.io.File name = "ReVanced-CLI", version = ["1.0.0"], mixinStandardHelpOptions = true ) internal object MainCommand : Runnable { + @Option(names = ["-p", "--patches"], description = ["One or more bundles of patches"]) + internal var patchBundles = arrayOf() + @Parameters( paramLabel = "INCLUDE", description = ["Which patches to include. If none is specified, all compatible patches will be included"] ) internal var includedPatches = arrayOf() - @Option(names = ["-p", "--patches"], description = ["One or more bundles of patches"]) - internal var patchBundles = arrayOf() - @Option(names = ["-c", "--cache"], description = ["Output resource cache directory"], required = true) internal lateinit var cacheDirectory: String @@ -75,8 +74,4 @@ internal object MainCommand : Runnable { ).deploy() } } -} - -internal fun main(args: Array) { - CommandLine(MainCommand).execute(*args) } \ No newline at end of file