Avoid dependency resolution during configuration

In this docs section Avoid dependency resolution during configuration the following snippet is given:

task printDeps {
    doFirst {
        configurations.compileClasspath.files.each { println it } // ✅ Deferring Dependency Resolution
    }
    doLast {
        configurations.compileClasspath.files.each { println it } // ❌ Resolving Dependencies During Configuration
    }
}

Is this a mistake? I don’t see how code in doLast is “:cross_mark: Resolving Dependencies During Configuration”.

You should probably report that.
I also don’t see the sense in this example.
The difference between doFirst and doLast is just to which end of the task action list the action is added.
I guess the doLast should not be there but the contained line directly in the task configuration closure, then it would make sense.
This example was recently added with the 8.14 release.

Vampire is right. Please file a GitHub issue, and I will fix it.