public class CommandAlias extends NoopBuildRule implements BinaryBuildRule, HasRuntimeDeps
BinaryBuildRule
that wraps other build rules, and can optionally add extra arguments,
environment variables, or run different tools per host Platform
.Modifier and Type | Class and Description |
---|---|
static class |
CommandAlias.UnsupportedPlatformException
Specific runtime exception type that is thrown when trying to run a tool via
CommandAlias on a platform that has not been provided. |
Constructor and Description |
---|
CommandAlias(BuildTarget buildTarget,
ProjectFilesystem projectFilesystem,
Optional<BuildRule> genericDelegate,
com.google.common.collect.ImmutableSortedMap<Platform,BuildRule> platformDelegates,
com.google.common.collect.ImmutableList<Arg> args,
com.google.common.collect.ImmutableSortedMap<String,Arg> env,
Platform platform) |
Modifier and Type | Method and Description |
---|---|
Tool |
getExecutableCommand(OutputLabel outputLabel)
Command to execute the output of this rule.
|
java.util.stream.Stream<BuildTarget> |
getRuntimeDeps(BuildRuleResolver buildRuleResolver) |
boolean |
inputBasedRuleKeyIsEnabled() |
getBuildDeps, getBuildSteps, getSourcePathToOutput, hasBuildSteps, isCacheable
equals, getBuildTarget, getDependencies, getProjectFilesystem, getSourcePathOutputs, getType, hashCode, injectFields, toString, updateBuildRuleResolver
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
compareTo, getBuildDeps, getBuildSteps, getBuildTarget, getFullyQualifiedName, getProjectFilesystem, getSourcePathToOutput, hasBuildSteps, isCacheable, outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecution, toString, updateBuildRuleResolver
getDependencies, getSourcePathOutputs
getType
isSupported
public CommandAlias(BuildTarget buildTarget, ProjectFilesystem projectFilesystem, Optional<BuildRule> genericDelegate, com.google.common.collect.ImmutableSortedMap<Platform,BuildRule> platformDelegates, com.google.common.collect.ImmutableList<Arg> args, com.google.common.collect.ImmutableSortedMap<String,Arg> env, Platform platform)
public boolean inputBasedRuleKeyIsEnabled()
inputBasedRuleKeyIsEnabled
in interface SupportsInputBasedRuleKey
public java.util.stream.Stream<BuildTarget> getRuntimeDeps(BuildRuleResolver buildRuleResolver)
getRuntimeDeps
in interface HasRuntimeDeps
public Tool getExecutableCommand(OutputLabel outputLabel)
BinaryBuildRule
getExecutableCommand
in interface BinaryBuildRule
outputLabel
- associated with the executable