Suppose I have project P, with subprojects S1, S2, S3.
P doesn’t do anything (no source, no builds, nothing to execute) - it is just a container for S1, S2, S3, and a place to put the common build.gradle file with subproject config, etc.
Each subproject may/may not have a build.gradle of it’s own.
Now suppose the ‘maven’ plugin is included, and the gradle command line includes ‘uploadArchives’ task to be called.
If I do a simple ‘uploadArchives.doLast()’, my code is called 3 times - once for each subproject. However, I only want it to be called once total, and only after all 3 uploadArchives instances are successful. I don’t necessarily want it to be called as the very last thing before the entire script is finished… I really want it to happen immediately after the last uploadArchives, just in case there are other steps after that.