This SO post has a good explanation of what `afterEvaluate` does. Just a quote:

The afterEvaluate is useful in the root gradle file of a multi project build when you want to configure specific items based on the configuration made in subprojects