use of com.facebook.buck.model.InternalFlavor in project buck by facebook.
the class DistBuildTargetGraphCodec method decodeBuildTarget.
public static BuildTarget decodeBuildTarget(BuildJobStateBuildTarget remoteTarget, Cell cell) {
UnflavoredBuildTarget unflavoredBuildTarget = UnflavoredBuildTarget.builder().setShortName(remoteTarget.getShortName()).setBaseName(remoteTarget.getBaseName()).setCellPath(cell.getRoot()).setCell(Optional.ofNullable(remoteTarget.getCellName())).build();
ImmutableSet<Flavor> flavors = remoteTarget.flavors.stream().map(InternalFlavor::of).collect(MoreCollectors.toImmutableSet());
return BuildTarget.builder().setUnflavoredBuildTarget(unflavoredBuildTarget).setFlavors(flavors).build();
}
Aggregations