public class BuildTypeDependencies
extends Object
The purpose of this class is to maintain an index of build configuration id and ids of other configurations having snapshot dependencies on this configuration.
There are two maps: one has internal id as a key and another has external id as a key.
The first map contains resolved dependencies only (i.e. instance of DependencyOptions there is never of UnresolvedDependency type).
When asked to return ids of configurations depending on a specified build configuration, we look into the first map only (see getDependingOn method).
The second map is used to handle cases when a build configuration is loaded but its dependencies are not loaded yet (a), or when a build configuration is unloaded and there were other configurations depending on it (b).
a) in this case each time when a new build configuration is registered we look into myUnresolvedDependenciesMap for ids of other configurations
which possibly depend on this one, and ask them to resolve their dependencies by calling getDependencies method,
this will cause the call of dependencyRemoved & dependencyAdded methods so that unresolved dependency will be removed from myUnresolvedDependenciesMap
and resolved dependency will be added to the myResolvedDependenciesMap map
b) when configuration is unloaded, we create unresolved dependencies to this configuration in all depending configurations, and this causes calls to dependencyRemoved & dependencyAdded methods again
so that resolved dependency will be removed from myResolvedDependenciesMap and unresolved dependency will be added to the myUnresolvedDependenciesMap map