SourceSets are always eagerly created when using java plugin

I’ve noticed that, in a Gradle 5.6 project using the java plugin, all SourceSets are eagerly created, even if they are added via register instead of via create (i.e. they are registered for lazy creation instead of explicitly eagerly created).

This occurs because when the java plugin is applied, pluginConvention.getSourceSets().all(…) is called (see the code linked below).

Is this intentional? Or should all be changed to configureEach? If it should be changed, I’ll file an issue.

It seems that some work on the lazy APIs must be done before this can be switched: