CacheLayoutTest.groovy

Consume capabilities from external modules This commit introduces the ability to consume capabilities from external modules. This is a pretty big change for multiple reasons:

- capabilities are no longer known beforehand (before resolution starts) but can be discovered as we add more nodes to the graph - conflict resolution cannot fail fast anymore, since it is possible for a module to declare a capability that triggers a conflict with another module in the graph, but a 3rd party module can express a preference - capabilities are consumed from Gradle metadata files - capabilities from the local component and capabilities from the graph are merged during resolution

Capabilities are, in published metadata, available at the component level, with the assumption that capabilities are the same for all variants. It is not necessary for a module to express a preference for a capability, as a 3rd party module can declare only a preference, for example.