# Unit test plugin's afterEvaulate

**URL:** <https://discuss.gradle.org/t/unit-test-plugins-afterevaulate/37437>\
**Category:** Help/Discuss\
**Created:** [August 29, 2020, 6:34am UTC](https://discuss.gradle.org/t/unit-test-plugins-afterevaulate/37437 "2020-08-29T06:34:35Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Lance](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/lance/32/787_2.png) [@Lance](https://discuss.gradle.org/u/Lance)\
**Post date:** [August 30, 2020, 11:31am UTC](https://discuss.gradle.org/t/unit-test-plugins-afterevaulate/37437/3 "2020-08-30T11:31:24Z")

</div>

Not answering your question, but it’s best to avoid `afterEvaluate {}`. What type of object is `myExtension.getConfigurations()`? I’m guessing it implements [DomainObjectCollection](https://docs.gradle.org/current/javadoc/org/gradle/api/DomainObjectCollection.html) which means that you could use one of the “live” methods (eg all(Closure) or matching(Closure)) instead of afterEvaluate.

---

_[View the full topic](https://discuss.gradle.org/t/unit-test-plugins-afterevaulate/37437)._
