fix: specify correct class containing entry-point

This commit is contained in:
oSumAtrIX 2023-08-23 14:50:32 +02:00
parent 1fd3b83d46
commit 1fcc591222
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
3 changed files with 6 additions and 6 deletions

View File

@ -37,7 +37,7 @@ tasks {
shadowJar {
manifest {
attributes("Main-Class" to "app.revanced.cli.main.MainKt")
attributes("Main-Class" to "app.revanced.cli.command.MainCommandKt")
}
minimize {
exclude(dependency("org.jetbrains.kotlin:.*"))

View File

@ -8,7 +8,7 @@ import picocli.CommandLine.IVersionProvider
import java.util.*
fun main(args: Array<String>) {
CommandLine(Main).execute(*args)
CommandLine(MainCommand).execute(*args)
}
internal typealias PatchList = List<PatchClass>
@ -18,7 +18,7 @@ internal val logger = DefaultCliLogger()
object CLIVersionProvider : IVersionProvider {
override fun getVersion(): Array<String> {
Properties().apply {
load(Main::class.java.getResourceAsStream("/app/revanced/cli/version.properties"))
load(MainCommand::class.java.getResourceAsStream("/app/revanced/cli/version.properties"))
}.let {
return arrayOf("ReVanced CLI v${it.getProperty("version")}")
}
@ -37,4 +37,4 @@ object CLIVersionProvider : IVersionProvider {
OptionsCommand::class,
]
)
internal object Main
internal object MainCommand

View File

@ -1,12 +1,12 @@
package app.revanced.cli.logging.impl
import app.revanced.cli.command.Main
import app.revanced.cli.command.MainCommand
import app.revanced.cli.logging.CliLogger
import java.util.logging.Logger
import java.util.logging.SimpleFormatter
internal class DefaultCliLogger(
private val logger: Logger = Logger.getLogger(Main::class.java.name),
private val logger: Logger = Logger.getLogger(MainCommand::class.java.name),
private val errorLogger: Logger = Logger.getLogger(logger.name + "Err")
) : CliLogger {