From 6ffba3ef0a089c01fd31b667a37a27e77186bbbd Mon Sep 17 00:00:00 2001 From: Canny1913 <94744045+Canny1913@users.noreply.github.com> Date: Thu, 5 May 2022 20:19:59 +0300 Subject: [PATCH] fix: gradle build script Signed-off-by: oSumAtrIX --- build.gradle.kts | 4 ++-- src/main/kotlin/app/revanced/cli/Main.kt | 7 +++++++ src/main/kotlin/app/revanced/cli/MainCommand.kt | 5 ----- 3 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 src/main/kotlin/app/revanced/cli/Main.kt diff --git a/build.gradle.kts b/build.gradle.kts index 730003e9..25815c9a 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")) @@ -39,7 +39,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 00000000..f62f798d --- /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 a15b07fe..0abfe897 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 picocli.CommandLine import picocli.CommandLine.* import java.io.File @@ -57,8 +56,4 @@ internal object MainCommand : Runnable { if (!wipe) return File(cacheDirectory).deleteRecursively() } -} - -internal fun main(args: Array) { - CommandLine(MainCommand).execute(*args) } \ No newline at end of file