I have a multiproject gradle build with the following subprojects: sample-api sample-common that depends on sample-api sample-server that depends on sample-api and sample-common.
I would like to avoid building/publishing sample-api.jar, sample-common.jar or sample-server.ear if the source code hasn't been changed (svn diff) since the previous release. sample-api.jar and sample-common.jar will be consumed by external clients and I want to avoid unnecessary builds/publicatios let' say to nexus repo. The whole project is build with gradle from jenkins.
Currently I know how to make sample-common depend on sample-api.jar if sample-api source code has no changes - and on sample-api project otherwise. But I also need to avoid sample-common build if sample-api and sample-common have no changes; same with sample-server - no build if nothing has changed in sample-api+sample-ocmmon+sample-server. I want it recursively.
There must be a pretty standard solution for this problem?
Thanks.