Groovy web console

subscribe to the feed Subscribe
to this
site

Groovy suck

Published 1 month ago by M with tags M
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def generateDestinationsParameter(destinations) {
output = ""
    for (int i = 0; i < destinations.size(); i++) {
        output += "-destination '${destinations[i]}' "
    }
    return output
}

all_dest = ['platform=iOS Simulator,name=iPhone 11,OS=latest', 'platform=iOS Simulator,name=iPhone X,OS=12.4']


println(generateDestinationsParameter(all_dest))