T- the type of args that the rule implementation uses
public interface RuleDescription<T extends BuildRuleArg> extends Description<T>
Descriptionthat we will use during the analysis of a rule.
RuleDescription will offer
BuildRuleArg) method, which provides a set of restricted information via the
RuleAnalysisContext to run the rule implementation.
|Modifier and Type||Method and Description|
Whether or not the build rule subgraph produced by this
Runs the rule implementation during the analysis phase.
default boolean producesCacheableSubgraph()
Descriptionis safe to cache in
IncrementalActionGraphGeneratorfor incremental action graph generation.
ProviderInfoCollection ruleImpl(RuleAnalysisContext context, BuildTarget target, T args) throws ActionCreationException, RuleAnalysisException
Providers and corresponding
InfoInterfaces, and register its corresponding actions.
RuleAnalysisContextcontaining all the information usable by this rule for it's analysis and constructive of its corresponding
BuildTargetof this rule
args- The args of type
Tthat this rule uses to rule its analysis
ProviderInfoCollectionthat contains all the
Providerand the corresponding
InfoInterfaceto be propagated by this rule.
ActionCreationException- If an action cannot be created correctly
RuleAnalysisException- If the rule implementation could not run as expected. e.g. if the implementation method of a User Defined Rule fails to eval