This is not what I suggested, sorry for confusing you. My idea was
1. To check if the problem is just the
mode
variable containing inappropriate symbols. To figure it out, I recommended you to try setting it as
val packForXcode by tasks.creating(Sync::class) {
group = "build"
//val mode = System.getenv("CONFIGURATION") ?: "DEBUG"
val mode = "DEBUG"
val sdkName = System.getenv("SDK_NAME") ?: "iphonesimulator"
...
I already checked it locally, and it works as expected. Therefore, my second recommendation was:
2. Try changing the original line to be set on
RELEASE
when you build for the release, and to
DEBUG
when you build your development, debug, etc. To achieve that, I would recommend something like
val mode = if (System.getenv("CONFIGURATION").toUpperCase() == "DEBELOPMENT") "DEBUG" else System.getenv("CONFIGURATION")
...