fix: show actual version in CLI

This commit is contained in:
Lucaskyy 2022-06-22 16:51:29 +02:00
parent 4cc2f5269f
commit 1dcdbc9fe9
No known key found for this signature in database
GPG Key ID: 1530BFF96D1EEB89

View File

@ -13,8 +13,16 @@ import picocli.CommandLine.*
import java.io.File
import java.nio.file.Files
private class CLIVersionProvider : IVersionProvider {
override fun getVersion() = arrayOf(
MainCommand::class.java.`package`.implementationVersion ?: "unknown"
)
}
@Command(
name = "ReVanced-CLI", version = ["1.0.0"], mixinStandardHelpOptions = true
name = "ReVanced-CLI",
mixinStandardHelpOptions = true,
versionProvider = CLIVersionProvider::class
)
internal object MainCommand : Runnable {
@ArgGroup(exclusive = false, multiplicity = "1")