Hi Jacques

When you run "gradlew generateAllPluginsDocumentation", all "actions"
defined in the task '"generateAllPluginsDocumentation" get executed as part
of execution phase. doFirst and doLast are the actions defined hence they
get executed.

And when you run any other tasks, all tasks present in the project
(including subprojects) are just configured not executed*. *So when we run
say ./gradlew config, everything that is not defined an an action (doFirst,
doLast or any other action) gets executed as part of configuration phase
for generateAllPluginsDocumentation task.

doLast { delete "${component}/src/docs/asciidoc/images/OFBiz-Logo.svg" }
Above is supposed to be executed during execution phase of the task
because doLast is an action for the task.  If you define your print
statements inside doLast, you won't see it printed if you run any other
task.

The problem is the part that is generating the docs, should be defined in
an action but at present is part of configuration. That's why when other
tasks run, docs are generated but never deleted (deletion part being
defined in doLast).

Best Regards,
- Girish

Reply via email to