See tasks created during configuration

Following guidance on lazy configuring tasks
Then run a build with --scan to see results
Shows Created during configuration 14
But then down below none of them say X tasks created on the right side
And opening each in detail, can’t find any that show tasks created
Viewing page source and searching for tasks created returns nothing

How can I see what these 14 tasks created during configuration are?

See attached screenshot from scan

For me there is an additional column to the right of “applied to x projects” where it says how many tasks were created immediately or during configuration and then you can expand to see which it were exactly. Maybe you got some bug is it is not the case for you.

I see that column in the HTML of the page, td.ConfigurationTabCodeUnitItem__early-tasks-count, it exists on every row, but it is empty

Added the below to the root project, seems to work to log when a task is configured… oddly noticing that the tasks being configured I do not expect is the clean task of every subproject. Any ideas on why this is appreciated

allprojects.forEach { p ->
  p.afterEvaluate {
    tasks.configureEach {
      logger.warn("pcr configuring ${p.name} : ${this.name}")
    }
  }
}

Running with debugging logging can clearly see the clean task being “realized”. Having trouble figuring out why that is the case

2022-05-26T09:10:45.826-0400 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Register task :annotation:clean' started
2022-05-26T09:10:45.826-0400 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Completing Build operation 'Register task :annotation:clean'
2022-05-26T09:10:45.826-0400 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Register task :annotation:clean' completed
2022-05-26T09:10:45.867-0400 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Realize task :annotation:clean' started
2022-05-26T09:10:45.867-0400 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Completing Build operation 'Realize task :annotation:clean'
2022-05-26T09:10:45.867-0400 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Realize task :annotation:clean' completed

seems to even happen on the basic gradle demo project so opened an issue

1 Like