Added fat jar generation

This commit is contained in:
Abdelilah El Aissaoui 2022-03-27 06:27:31 +02:00
parent 602b45dd21
commit 16c0c39906

View file

@ -54,3 +54,25 @@ compose.desktop {
}
}
}
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)
}