Build downstream dependencies

I’m wondering if this is possible to triggers build process for a project in change and all of its downstream dependencies in one run.

Let’s assume we have the following project structure:

root
 - ProjA
 - ProjB
 - ProjC 

where the only dependency is ProjA <- ProjB as project(':A').

Then I do a change in ProjA and want to find out whether I broke something for people who depend on me or not. Ideal execution here would be to build ProjA, then build ProjB and don’t build ProjC as there were no changes in its upstream.

There’s feature request in Jenkins plugin for Gradle that seem to target that problem: https://issues.jenkins-ci.org/browse/JENKINS-19941. It’s open though…

Thanks!

If you’re using a multi-project structure, you can use buildDependents:

https://docs.gradle.org/current/userguide/multi_project_builds.html#sec:multiproject_build_and_test

1 Like

Looks like exactly want I need. Thanks a lot!