Composite builds work for me as described in the documentation, where dependencies in the composite project are replaced with projects from the included project. Meaning, that if I add
includeBuild('../foo') {
dependencySubstitution {
substitute module('com.foo:bar') with project(':bar')
}
}
to settings.gradle, any usages of module “com.foo:bar” in the composite project are replaced by the project “:bar” from the included “foo” project.
However, I would like to do the inverse, i.e. replace dependencies in the included project with projects from the composite project. In the above case, “com.foo:bar” would be used in the included “foo” project and should be replaced by the project “:bar” from the composite project.
This does not work for me. Is that possible to achieve this?