From 04bef1b3e8facf6c4c7b42b210754aba140b68f4 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Sat, 11 May 2024 14:02:05 +0200 Subject: [PATCH] shadowJar support --- app/build.gradle.kts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 1733fa1..04fbc13 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -5,9 +5,12 @@ * For more details on building Java & JVM projects, please refer to https://docs.gradle.org/8.4/userguide/building_java_projects.html in the Gradle documentation. */ +import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar + plugins { // Apply the application plugin to add support for building a CLI application in Java. application + id("com.github.johnrengelman.shadow") version "8.1.1" } repositories { @@ -41,3 +44,11 @@ tasks.named("test") { // Use JUnit Platform for unit tests. useJUnitPlatform() } + +tasks.withType { + archiveBaseName.set("xl") + archiveVersion.set("") + manifest { + attributes(mapOf("Main-Class" to "com.github.csolem.gradle.shadow.kotlin.example.App")) + } +} \ No newline at end of file