In 1.9, it appears that the TaskModelRealizingConfigurationAction runs after BuildScriptProcessor. This consequently means that if I reference a task managed by the ModelRegistry in a plugin using tasks.getByName, my build will fail when the BuildScriptProcessor runs my plugin. My canonical example are the generateDescriptorFileFor%sPublication tasks. I used to reference them immediately via tasks.getByName in my plugin, but in 1.9 they’re not available yet. I’m not saying that anything has to change, just mentioning it as a regression, since these documented tasks were available immediate after applying the plugin before.
A work around is to use the DomainObjectCollection matching and all methods, e.g.
project.tasks.matching { it.name == 'generateDescriptorFileForJavaPublication'}.all {
DefaultTask generateDescriptorTask ->
// Do something with generate task
}