diff --git a/build.gradle.kts b/build.gradle.kts index 82e7d38..2717f73 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -53,4 +53,26 @@ compose.desktop { packageVersion = "1.0.0" } } +} + + +task("fatJar", type = Jar::class) { + archiveBaseName.set("${project.name}-fat") + + duplicatesStrategy = DuplicatesStrategy.EXCLUDE + + manifest { + attributes["Implementation-Title"] = "Gitnuro" + attributes["Implementation-Version"] = projectVersion + attributes["Main-Class"] = "MainKt" + } + from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) }) { + exclude( + "META-INF/MANIFEST.MF", + "META-INF/*.SF", + "META-INF/*.DSA", + "META-INF/*.RSA", + ) + } + with(tasks.jar.get() as CopySpec) } \ No newline at end of file