Subproject depends on configuration from other subproject, but subproject build order doesn't respect that

This is not the way to do it. It creates too much coupling and does way too much.

You need to declare the configuration as an input to the task.

task doStuffWithRuntimeDeps() {
 inputs.files configurations.runtime
 doLast {
  //do stuff
 }
}
1 Like