Pull project artifacts from maven repo

Using the current gradle version, you can solve this with a custom ResolutionStrategy

def isCi = System.properties['ci'] == "true"
if (isCi) {
   configurations.all {
      resolutionStrategy {
         dependencySubstitution {
            substitute project(':foo') with module('mycompany:foo:1.2.3')
         }
      }
   }
}

There’s a new composite build feature coming to gradle soon. This may also help in future