Every project has uploadArchives as well as copyPackages. uploadArchives is the normal one; copyPackages does something similar, but organizes the files for our deploy scripts to pick up.
I want to make sure that if :someProject:uploadArchives is run, that uploadArchives is run for every one of its dependent projects as well. Likewise, if :someProject:copyPackages is run, then copyPackages should run for every project that someProject depends on.
Suppose I have the following projects, with their dependencies:
Base: no dependencies Log: depends on Base Lib: Depends on Log and Base App1: Depends on Lib, Log, and Base App2: Depends on Lib, Log, and Base
If I tell Gradle to execute :App1:copyPackages, i want to see Gradle run: :Base:copyPackages :Log:copyPackages :Lib:copyPackages :App1:copyPackages
If you want to align task dependencies with project dependencies, Configuration.getTaskDependencyFromProjectDependency is the way to go. This is, for example, used by the Java plugin to wire up the ‘buildNeeded’ and ‘buildDependent’ tasks.
Also, I found out why my group was showing up as “master.” When I switched to configuration-on-demand, I just replaced my subprojects { … } section with gradle.beforeProject { project -> configure(project) { … } }. Since the code to set each subproject’s group was contained in that block, it didn’t get set unless the project was needed. By moving those lines back into a subprojects {} block, my groups are back to what they should be.