chore: Lint code

This commit is contained in:
oSumAtrIX
2023-11-26 05:56:31 +01:00
parent e7c3d64bf1
commit 5fd205f77d
7 changed files with 202 additions and 180 deletions

View File

@@ -7,23 +7,24 @@ import picocli.CommandLine.Command
import picocli.CommandLine.IVersionProvider
import java.util.*
fun main(args: Array<String>) {
Logger.setDefault()
CommandLine(MainCommand).execute(*args).let(System::exit)
}
private object CLIVersionProvider : IVersionProvider {
override fun getVersion() = arrayOf(
MainCommand::class.java.getResourceAsStream(
"/app/revanced/cli/version.properties"
)?.use { stream ->
Properties().apply {
load(stream)
}.let {
"ReVanced CLI v${it.getProperty("version")}"
}
} ?: "ReVanced CLI")
override fun getVersion() =
arrayOf(
MainCommand::class.java.getResourceAsStream(
"/app/revanced/cli/version.properties",
)?.use { stream ->
Properties().apply {
load(stream)
}.let {
"ReVanced CLI v${it.getProperty("version")}"
}
} ?: "ReVanced CLI",
)
}
@Command(
@@ -36,6 +37,6 @@ private object CLIVersionProvider : IVersionProvider {
PatchCommand::class,
OptionsCommand::class,
UtilityCommand::class,
]
],
)
private object MainCommand
private object MainCommand