Not answering your question, but it’s best to avoid afterEvaluate {}
. What type of object is myExtension.getConfigurations()
? I’m guessing it implements DomainObjectCollection which means that you could use one of the “live” methods (eg all(Closure) or matching(Closure)) instead of afterEvaluate.