Add shadow plugin to create uber JAR
Some checks failed
Pull Request / build (pull_request) Failing after 3m11s
Some checks failed
Pull Request / build (pull_request) Failing after 3m11s
This commit is contained in:
parent
baa4b9bd1a
commit
8976165b27
@ -2,7 +2,9 @@ plugins {
|
|||||||
alias(libs.plugins.kotlin.jvm)
|
alias(libs.plugins.kotlin.jvm)
|
||||||
alias(libs.plugins.kotlin.serialization)
|
alias(libs.plugins.kotlin.serialization)
|
||||||
alias(libs.plugins.detekt)
|
alias(libs.plugins.detekt)
|
||||||
|
alias(libs.plugins.shadow)
|
||||||
alias(libs.plugins.jfx)
|
alias(libs.plugins.jfx)
|
||||||
|
java
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "com.marvinelsen"
|
group = "com.marvinelsen"
|
||||||
@ -55,3 +57,10 @@ detekt {
|
|||||||
allRules = false
|
allRules = false
|
||||||
autoCorrect = true
|
autoCorrect = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.jar {
|
||||||
|
manifest {
|
||||||
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||||
|
attributes["Main-Class"] = "com.marvinelsen.willow.MainKt"
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +1,7 @@
|
|||||||
[versions]
|
[versions]
|
||||||
kotlin = "2.0.20"
|
kotlin = "2.0.20"
|
||||||
detekt = "1.23.7"
|
detekt = "1.23.7"
|
||||||
|
shadow = "8.3.5"
|
||||||
jfx-plugin = "0.1.0"
|
jfx-plugin = "0.1.0"
|
||||||
javafx = "23"
|
javafx = "23"
|
||||||
|
|
||||||
@ -50,4 +51,8 @@ kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", versi
|
|||||||
# See: https://detekt.dev
|
# See: https://detekt.dev
|
||||||
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
|
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
|
||||||
|
|
||||||
|
# Gradle Shadow
|
||||||
|
# See: https://gradleup.com/shadow/
|
||||||
|
shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }
|
||||||
|
|
||||||
jfx = { id = "org.openjfx.javafxplugin", version.ref = "jfx-plugin" }
|
jfx = { id = "org.openjfx.javafxplugin", version.ref = "jfx-plugin" }
|
||||||
|
5
src/main/kotlin/com/marvinelsen/willow/Main.kt
Normal file
5
src/main/kotlin/com/marvinelsen/willow/Main.kt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package com.marvinelsen.willow
|
||||||
|
|
||||||
|
fun main(args: Array<String>) {
|
||||||
|
actualMain(args)
|
||||||
|
}
|
@ -85,6 +85,6 @@ class WillowApplication : Application() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("SpreadOperator")
|
@Suppress("SpreadOperator")
|
||||||
fun main(args: Array<String>) {
|
fun actualMain(args: Array<String>) {
|
||||||
Application.launch(WillowApplication::class.java, *args)
|
Application.launch(WillowApplication::class.java, *args)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user