Skip to content

Commit

Permalink
Update build.gradle.kts
Browse files Browse the repository at this point in the history
  • Loading branch information
Hummel009 authored Nov 17, 2023
1 parent eabc72f commit 958900f
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,44 @@ import java.time.format.DateTimeFormatter

plugins {
id("org.jetbrains.kotlin.jvm") version "1.9.20"
id("org.openjfx.javafxplugin") version "0.1.0"
id("application")
}

group = "org.example"
group = "hummel"
version = "v" + LocalDate.now().format(DateTimeFormatter.ofPattern("yy.MM.dd"))

repositories {
mavenCentral()
}

val embed: Configuration by configurations.creating

dependencies {
embed("org.jetbrains.kotlin:kotlin-stdlib:1.9.20")
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlin {
jvmToolchain(17)
}

application {
mainClass = "hummel.MainKt"
}

javafx {
version = "22-ea+11"
modules = listOf("javafx.controls", "javafx.fxml")
}

tasks {
jar {
manifest {
attributes(mapOf("Main-Class" to "hummel.MainKt"))
attributes(
mapOf(
"Main-Class" to "hummel.MainKt"
)
)
}
from(configurations.runtimeClasspath.get().map {
from(embed.map {
if (it.isDirectory) it else zipTree(it)
})
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
}
}

0 comments on commit 958900f

Please sign in to comment.