Graphical: executable JAR

This commit is contained in:
PeratX 2020-03-05 09:29:13 +08:00
parent b6fb0f06ef
commit 34bece6622
2 changed files with 13 additions and 3 deletions

View File

@ -13,6 +13,13 @@ javafx {
apply(plugin = "com.github.johnrengelman.shadow")
tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>() {
manifest {
attributes["Main-Class"] = "net.mamoe.mirai.console.graphical.MiraiGraphicalLoader"
}
}
val kotlinVersion: String by rootProject.ext
val atomicFuVersion: String by rootProject.ext
val coroutinesVersion: String by rootProject.ext
@ -41,4 +48,4 @@ dependencies {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
}

View File

@ -17,8 +17,11 @@ import tornadofx.App
import tornadofx.find
import tornadofx.launch
fun main(args: Array<String>) {
launch<MiraiGraphicalUI>(args)
object MiraiGraphicalLoader {
@JvmStatic
fun main(args: Array<String>) {
launch<MiraiGraphicalUI>(args)
}
}
class MiraiGraphicalUI : App(Decorator::class, PrimaryStyleSheet::class) {