use of org.gradle.platform.base.internal.ComponentSpecIdentifier in project gradle by gradle.
the class DependentComponentsRenderableDependency method of.
public static DependentComponentsRenderableDependency of(ComponentSpec componentSpec, ComponentSpecInternal internalProtocol, LinkedHashSet<DependentComponentsRenderableDependency> children) {
ComponentSpecIdentifier id = internalProtocol.getIdentifier();
String name = DependentComponentsUtils.getBuildScopedTerseName(id);
String description = componentSpec.getDisplayName();
boolean buildable = true;
if (componentSpec instanceof VariantComponentSpec) {
// Consider variant aware components with no buildable binaries as non-buildables
VariantComponentSpec variantComponentSpec = (VariantComponentSpec) componentSpec;
buildable = Iterables.any(variantComponentSpec.getBinaries().values(), new Predicate<BinarySpec>() {
@Override
public boolean apply(BinarySpec binarySpec) {
return binarySpec.isBuildable();
}
});
}
boolean testSuite = false;
return new DependentComponentsRenderableDependency(id, name, description, buildable, testSuite, children);
}
Aggregations