refactor: add arguments support to run client or server
This commit is contained in:
@@ -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']
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user