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