client gui + headless server

This commit is contained in:
2025-03-04 16:07:35 +01:00
parent e536a45266
commit 76da347fb9
4 changed files with 61 additions and 2 deletions

View File

@@ -8,6 +8,7 @@
plugins {
// Apply the application plugin to add support for building a CLI application in Java.
id 'application'
id 'org.openjfx.javafxplugin' version '0.1.0'
}
repositories {
@@ -32,9 +33,13 @@ java {
}
}
javafx {
modules = ['javafx.graphics', 'javafx.controls', 'javafx.fxml' ]
}
application {
// Define the main class for the application.
mainClass = 'ChatApp'
mainClass = 'client.ClientGui'
}
run {
@@ -48,7 +53,7 @@ tasks.named('test') {
useJUnitPlatform()
}
tasks.register("server", JavaExec){
tasks.register("admin", JavaExec){
group = "ChatAppConsole"
description = "Runs the server + the admin client"
mainClass.set("ChatApp")
@@ -56,6 +61,14 @@ tasks.register("server", JavaExec){
standardInput = System.in
}
tasks.register("server", JavaExec){
group = "ChatAppConsole"
description = "Runs the headless server"
mainClass.set("ChatAppServer")
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
}
tasks.register("client", JavaExec) {
group = "ChatAppConsole"
description = "Runs the client"