no more tasks

This commit is contained in:
2025-03-04 19:30:42 +01:00
parent 0560d23cd3
commit 0a8006fd56

View File

@@ -39,47 +39,24 @@ javafx {
application {
// Define the main class for the application.
mainClass = 'client.ClientGui'
if (project.hasProperty('admin')) {
mainClass = 'ChatApp'
} else if (project.hasProperty('server')) {
mainClass = 'ChatAppServer'
}else if (project.hasProperty('client')) {
mainClass = 'ChatAppClient'
}else if (project.hasProperty('serverGui')) {
mainClass = 'server.ServerGUI'
} else {
mainClass = 'client.ClientGui'
}
}
run {
standardInput = System.in
}
tasks.named('test') {
// Use JUnit Platform for unit tests.
useJUnitPlatform()
}
tasks.register("admin", JavaExec){
group = "ChatAppConsole"
description = "Runs the server + the admin client"
mainClass.set("ChatApp")
classpath = sourceSets.main.runtimeClasspath
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"
mainClass.set("ChatAppClient")
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
}
tasks.register("serverGUI", JavaExec) {
group = "ChatAppGUI"
description = "Runs a GUI for the server"
mainClass.set('server.ServerGUI')
classpath = sourceSets.main.runtimeClasspath
}