Prevent code generation from happening during the setup of the task. Simply by doing actual work in the doLast section.
Produce Java code from a template.