public class NoopBuildRule extends AbstractBuildRule implements SupportsInputBasedRuleKey
BuildRule which has no output. This is used in the following ways:
TestRules may not have any build steps to perform, but
have runTests Steps to run to determine their exit code.
| Constructor and Description |
|---|
NoopBuildRule(BuildTarget buildTarget,
ProjectFilesystem projectFilesystem) |
| Modifier and Type | Method and Description |
|---|---|
SortedSet<BuildRule> |
getBuildDeps() |
com.google.common.collect.ImmutableList<Step> |
getBuildSteps(BuildContext context,
BuildableContext buildableContext) |
SourcePath |
getSourcePathToOutput() |
boolean |
hasBuildSteps()
Whether this
BuildRule may have any steps to build. |
boolean |
isCacheable()
Whether this
BuildRule can be cached. |
equals, getBuildTarget, getDependencies, getProjectFilesystem, getSourcePathOutputs, getType, hashCode, injectFields, toString, updateBuildRuleResolverclone, finalize, getClass, notify, notifyAll, wait, wait, waitinputBasedRuleKeyIsEnabled, isSupportedcompareTo, getBuildTarget, getFullyQualifiedName, getProjectFilesystem, outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecution, toString, updateBuildRuleResolvergetDependencies, getSourcePathOutputsgetTypepublic NoopBuildRule(BuildTarget buildTarget, ProjectFilesystem projectFilesystem)
public final SortedSet<BuildRule> getBuildDeps()
getBuildDeps in interface BuildRuledeps argument for this build rule in the build file in which it was defined.
However, there are special cases where other arguments pull in implicit dependencies
(e.g., the keystore argument in android_binary). In these cases, the
implicit dependencies are also included in the set returned by this method. The value of
the original deps argument, as defined in the build file, must be accessed via a
custom getter provided by the build rule.
public final com.google.common.collect.ImmutableList<Step> getBuildSteps(BuildContext context, BuildableContext buildableContext)
getBuildSteps in interface BuildRulepublic final boolean hasBuildSteps()
BuildRuleBuildRule may have any steps to build.hasBuildSteps in interface BuildRulehasBuildSteps in class AbstractBuildRule@Nullable public final SourcePath getSourcePathToOutput()
getSourcePathToOutput in interface BuildRulepublic final boolean isCacheable()
BuildRuleBuildRule can be cached.
Uncached build rules are never written out to cache, never read from cache, and does not count in cache statistics. This rule is useful for artifacts which cannot be easily normalized.
Uncached rules are not always rebuilt, however, as long as the existing on-disk
representation is up to date. This means that these rules can take advantage of SupportsInputBasedRuleKey to prevent rebuilding.
isCacheable in interface BuildEngineActionisCacheable in interface BuildRuleisCacheable in class AbstractBuildRule