Closed phatblat closed 2 years ago
OK, this appears to be a Groovy thing. Both setting additionalParameters
to a single string or a list literal (not array) in the xcodebuild
DSL extension work.
Where I was going wrong was creating an Array<String>
in kotlin like so:
xcodeExtension.additionalParameters = arrayOf("COMPILER_INDEX_STORE_ENABLE=NO")
I've changed our plugin to instead create a List<String>
and now it's working.
xcodeExtension.additionalParameters = listOf("COMPILER_INDEX_STORE_ENABLE=NO")
Can the docs be updated to instead say "list of parameters"?
In order to work around oclint/oclint#462 in all our iOS builds, I attempted to set the
additionalParameters
value to an array containing a single string"COMPILER_INDEX_STORE_ENABLE=NO"
. However, this causes thexcodebuild
task to fail.The problem is that there are extra brackets around the custom build setting in the resulting command.
However, setting
additionalParameters
to just a string instead of an array of string works fine.Is this a defect or is the documentation incorrect? I'll try setting multiple build settings to see whether that also breaks.