Search in sources :

Example 1 with DependentBinariesResolutionResult

use of org.gradle.platform.base.internal.dependents.DependentBinariesResolutionResult in project gradle by gradle.

the class DependentComponentsRenderer method getRenderableDependencyOf.

private DependentComponentsRenderableDependency getRenderableDependencyOf(final ComponentSpec componentSpec, ComponentSpecInternal internalProtocol) {
    if (resolver != null && componentSpec instanceof VariantComponentSpec) {
        VariantComponentSpec variantComponentSpec = (VariantComponentSpec) componentSpec;
        LinkedHashSet<DependentComponentsRenderableDependency> children = Sets.newLinkedHashSet();
        for (BinarySpecInternal binarySpec : variantComponentSpec.getBinaries().withType(BinarySpecInternal.class)) {
            DependentBinariesResolutionResult resolvedBinary = resolver.resolve(binarySpec);
            children.add(DependentComponentsRenderableDependency.of(resolvedBinary.getRoot()));
        }
        return DependentComponentsRenderableDependency.of(componentSpec, internalProtocol, children);
    } else {
        return DependentComponentsRenderableDependency.of(componentSpec, internalProtocol);
    }
}
Also used : VariantComponentSpec(org.gradle.platform.base.VariantComponentSpec) BinarySpecInternal(org.gradle.platform.base.internal.BinarySpecInternal) DependentBinariesResolutionResult(org.gradle.platform.base.internal.dependents.DependentBinariesResolutionResult)

Aggregations

VariantComponentSpec (org.gradle.platform.base.VariantComponentSpec)1 BinarySpecInternal (org.gradle.platform.base.internal.BinarySpecInternal)1 DependentBinariesResolutionResult (org.gradle.platform.base.internal.dependents.DependentBinariesResolutionResult)1