Groovy web console

subscribe to the feed Subscribe
to this
site

test

Published 1 month ago by ips
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def artifacts = [    
    [groupId: "blah", artifactId: "blah", classifier: "mac64"],
    [groupId: "ru.sbtqa", artifactId: "chromedriver-bin", classifier: "mac64"]
]

def withAnds = artifacts.find {
    it.groupId == "ru.sbtqa" &&
    it.artifactId == "chromedriver-bin" &&
    it.classifier == "mac64"
}

def withoutAnds = artifacts.find {
    it.groupId == "ru.sbtqa"
    it.artifactId == "chromedriver-bin"
    it.classifier == "mac64"
}

println("withAnds: ${withAnds}")
println("withoutAnds: ${withoutAnds}")