forked from SteamWar/SteamWar
Fix steamwar.devserver.gradle
This commit is contained in:
@@ -64,6 +64,10 @@ class DevServer extends DefaultTask {
|
|||||||
@Optional
|
@Optional
|
||||||
Boolean forceUpgrade = null
|
Boolean forceUpgrade = null
|
||||||
|
|
||||||
|
@Input
|
||||||
|
@Optional
|
||||||
|
String worldName = null
|
||||||
|
|
||||||
DevServer() {
|
DevServer() {
|
||||||
super()
|
super()
|
||||||
doFirst {
|
doFirst {
|
||||||
@@ -83,13 +87,16 @@ class DevServer extends DefaultTask {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (template.startsWith("Bau")) {
|
||||||
|
if (properties.containsKey("worldName")) {
|
||||||
worldName = properties.get("worldName")
|
worldName = properties.get("worldName")
|
||||||
|
} else {
|
||||||
|
throw new GradleException("Please supply the 'worldName' in a 'steamwar.properties' files either in this project dir or any parent project!")
|
||||||
|
}
|
||||||
|
}
|
||||||
host = properties.get("host")
|
host = properties.get("host")
|
||||||
debugPort = new Random().nextInt(5001, 10000)
|
debugPort = new Random().nextInt(5001, 10000)
|
||||||
|
|
||||||
if (worldName == null) {
|
|
||||||
throw new GradleException("Please supply the 'worldName' in a 'steamwar.properties' files either in this project dir or any parent project!")
|
|
||||||
}
|
|
||||||
if (host == null) {
|
if (host == null) {
|
||||||
throw new GradleException("Please supply the 'host' in a 'steamwar.properties' files either in this project dir or any parent project!")
|
throw new GradleException("Please supply the 'host' in a 'steamwar.properties' files either in this project dir or any parent project!")
|
||||||
}
|
}
|
||||||
@@ -115,9 +122,6 @@ class DevServer extends DefaultTask {
|
|||||||
@Internal
|
@Internal
|
||||||
Boolean running = true
|
Boolean running = true
|
||||||
|
|
||||||
@Internal
|
|
||||||
String worldName = null
|
|
||||||
|
|
||||||
class Finalizer extends DefaultTask {
|
class Finalizer extends DefaultTask {
|
||||||
|
|
||||||
Finalizer() {
|
Finalizer() {
|
||||||
|
|||||||
Reference in New Issue
Block a user