In “Gradle in Action”, section 8.5.4, “Plugin extension mechanism”, there is the following paragraph: > Every task of your plugin has a property named conventionMapping. To > be more specific, every task derived from DefaultTask owns this > property. You use this property to assign the extension model values > to a task’s input or output fields. By wrapping the extension model > value into a closure, you lazily set these values. This means that the > value is only calculated when the task is executed. To retrieve the > values of a property stored in convention mapping, you’ll need to > explicitly use getter methods, as shown in the next listing. Keep in > mind that trying to access a field directly will result in a null > value.
I was following this paragraph fine until the bolded sentence. I’m not sure what the point is there. Can someone elaborate on this?