shadowJar support

This commit is contained in:
Imbus 2024-05-11 14:02:05 +02:00
parent fec401be5d
commit 04bef1b3e8

View file

@ -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. * 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 { plugins {
// Apply the application plugin to add support for building a CLI application in Java. // Apply the application plugin to add support for building a CLI application in Java.
application application
id("com.github.johnrengelman.shadow") version "8.1.1"
} }
repositories { repositories {
@ -41,3 +44,11 @@ tasks.named<Test>("test") {
// Use JUnit Platform for unit tests. // Use JUnit Platform for unit tests.
useJUnitPlatform() useJUnitPlatform()
} }
tasks.withType<ShadowJar> {
archiveBaseName.set("xl")
archiveVersion.set("")
manifest {
attributes(mapOf("Main-Class" to "com.github.csolem.gradle.shadow.kotlin.example.App"))
}
}