From the book Gradle beyond the basics, I find it hard to follow the terminology being used. On page 44, there is a mention of “task rule” and also of “rule”, what’s the differrence. My intuition tells me that the “task rule” is the result of having a rule… but I am not sure. Can someone help me understand please?
Also: Page 43, Example 3-7, shows a call to tasks.addRule(…), which is later referenced as “this class is already getting a little too long”, why say “this class”?
You’re on the right track. A rule is some code that runs when Gradle can’t find a given name in a NamedDomainObjectCollection. So a “task rule” is just a specialized Rule that runs when a Task cannot be found in the TaskContainer. The task rule can create tasks.