41 lines
1.2 KiB
Groovy
41 lines
1.2 KiB
Groovy
ext {
|
|
def SERVER_TYPE_TEST = "test"
|
|
def SERVER_TYPE_PREVIEW = "pre"
|
|
def SERVER_TYPE_PRODUCT = "product"
|
|
|
|
def taskName = project.gradle.startParameter.taskNames[0]
|
|
if (taskName == null) {
|
|
taskName = ""
|
|
}
|
|
println "GradleLog TaskNameOutput " + taskName
|
|
|
|
def serverType = SERVER_TYPE_PRODUCT
|
|
|
|
if (taskName.endsWith("Debug")) {
|
|
serverType = SERVER_TYPE_TEST
|
|
} else if (taskName.endsWith("Preview")) {
|
|
serverType = SERVER_TYPE_PREVIEW
|
|
}
|
|
|
|
if (project.hasProperty("ServerType")) {
|
|
serverType = project.properties["ServerType"]
|
|
}
|
|
|
|
println "GradleLog ServerTypeOutput " + serverType
|
|
|
|
switch(serverType) {
|
|
case SERVER_TYPE_TEST:
|
|
case SERVER_TYPE_PREVIEW:
|
|
LOG_ENABLE = true
|
|
if (serverType == SERVER_TYPE_PREVIEW) {
|
|
HOST_URL = "https://api-mireotv.mireotv.com/4da6fd4c/"
|
|
} else {
|
|
HOST_URL = "https://api-mireotv.mireotv.com/4da6fd4c/"
|
|
}
|
|
break
|
|
case SERVER_TYPE_PRODUCT:
|
|
LOG_ENABLE = false
|
|
HOST_URL = "https://api-mireotv.mireotv.com/4da6fd4c/"
|
|
break
|
|
}
|
|
} |