View Source

It is quite common that a product is comprised of different components, and a component is used by different products. We suggest to set up builds for these components and products separately in this case, and utilize QuickBuild's dependency mechanism to use result of component builds in product builds.

h1. Dependency mechanism

QuickBuild implements build dependency through a special repository type - [QuickBuild repository]. Assume we have two configurations: _root/product_ and _root/component_. Configuration _root/product_ is created to build the product, and configuration _root/component_ is created to build component. To use component artifacts, you will need to:
# Switch to _repositories_ tab of _root/product_, and define a QuickBuild repository there retrieving desired files from desired build of _root/component_.
# Switch to _steps_ tab of _root/product_, and add a checkout step into step execution graph to check out from the repository defined above.

If the product depends on multiple components, you will just need to define multiple QuickBuild repositories corresponding to these components, and add multiple checkout steps to check out from these repositories in the product configuration.

h1. Dependency resolution

Taking the example used in the above section, before retrieving artifacts from configuration _root/component_, QuickBuild needs to determine which build in _root/componentA_ to be used. The process of resolving dependency build is called dependency resolution in QuickBuild, and is controlled by the property _build_ when define the QuickBuild repository as shown below:
!dependency.png!
Embedded help of this property explains meaning of different choices and how they affect the dependency resolution process.

h1. Change detection

Just as other repository types, changes will be detected from QuickBuild repository if [dependent build] is triggered.