refactor: add arguments support to run client or server

This commit is contained in:
2025-03-31 20:58:05 +02:00
parent aaebae7850
commit d3b523048f
11 changed files with 198 additions and 50 deletions

View File

@@ -40,3 +40,19 @@ tasks.named('test') {
// Use JUnit Platform for unit tests.
useJUnitPlatform()
}
task runServer(type: JavaExec) {
description = 'Runs the server'
group = 'application'
mainClass = application.mainClass
classpath = sourceSets.main.runtimeClasspath
args = ['server']
}
task runClient(type: JavaExec) {
description = 'Runs the client'
group = 'application'
mainClass = application.mainClass
classpath = sourceSets.main.runtimeClasspath
args = ['client']
}