How to depend on WAR file built by project, not the jar file?

I’m familiar with tasks depending on other tasks. You seem to be implying that “configurations” can depend on things (“configurations do”). I’m not sure what to do with that information. You then say that I need to specify that my task depends on a configuration by “being an input to that task”. How do I do that exactly?

My present dependencies and task definition look like this:
`dependencies {
runtime project(path: “:ordersService”, configuration: “war”)
runtime project(path: “:ordersGUI”, configuration: “war”)
runtime “oracle:ojdbc6:11.2.0.3”
}

task buildImage(type: DockerBuildImage) {
inputDir = file("${buildDir}/context")
imageId = “ssorderprocessingdashboard”
}`

I actually have another task called “copyDependencies” that copies the built WARs, so technically it’s that task that should be depending on those other projects being built, so I need to determine how I can provide the two configurations as “input to the task”.

If it matters, this is what that task looks like:
`task copyDependencies << {
project.copy {
from "src/docker"
into "${buildDir}/context"
include "Dockerfile"
include ".properties"
include "
.txt"
include “.excerpt"
include "
.sh”
}

configurations.runtime.setTransitive(false).resolvedConfiguration.resolvedArtifacts
.each { artifact ->
project.copy {
from artifact.file
into "${buildDir}/context"
rename { “${artifact.name}.${artifact.extension}” }
}
}
}`