import eu.jonahbauer.chat.build.jlink.JLinkTask plugins { id("chat-bot.java-conventions") } group = "eu.jonahbauer.chat" val bot : Configuration by configurations.creating configurations.runtimeOnly { extendsFrom(bot) } dependencies { implementation(project(":bot-api")) implementation(project(":management")) implementation(libs.gson) implementation(libs.slf4j) runtimeOnly(libs.logback) project.project(":bots").subprojects.forEach { bot(project(it.path)) } } tasks.named("compileJava") { options.javaModuleMainClass = "eu.jonahbauer.chat.server.Main" } tasks.register("jlink") { modules = listOf("ALL-MODULE-PATH", "jdk.crypto.ec") options = listOf("--no-header-files", "--no-man-pages", "--strip-debug", "--compress=zip-6") } tasks.register("run") { group = "application" description = "runs the application using the custom runtime image" executable = project.layout.buildDirectory.file("dist/jre/bin/java").get().asFile.path args("--enable-preview", "-m", "eu.jonahbauer.chat.server") dependsOn(tasks.named("jlink")) }