Search in sources :

Example 1 with InternalFlavor

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();
}
Also used : UnflavoredBuildTarget(com.facebook.buck.model.UnflavoredBuildTarget) InternalFlavor(com.facebook.buck.model.InternalFlavor) Flavor(com.facebook.buck.model.Flavor)

Aggregations

Flavor (com.facebook.buck.model.Flavor)1 InternalFlavor (com.facebook.buck.model.InternalFlavor)1 UnflavoredBuildTarget (com.facebook.buck.model.UnflavoredBuildTarget)1