use of com.facebook.buck.rules.keys.ContentAgnosticRuleKeyFactory in project buck by facebook.
the class ActionGraphCache method getRuleKeysFromBuildRules.
private static Map<BuildRule, RuleKey> getRuleKeysFromBuildRules(Iterable<BuildRule> buildRules, BuildRuleResolver buildRuleResolver, RuleKeyFieldLoader fieldLoader) {
SourcePathRuleFinder ruleFinder = new SourcePathRuleFinder(buildRuleResolver);
SourcePathResolver pathResolver = new SourcePathResolver(ruleFinder);
ContentAgnosticRuleKeyFactory factory = new ContentAgnosticRuleKeyFactory(fieldLoader, pathResolver, ruleFinder);
HashMap<BuildRule, RuleKey> ruleKeysMap = new HashMap<>();
for (BuildRule rule : buildRules) {
ruleKeysMap.put(rule, factory.build(rule));
}
return ruleKeysMap;
}
use of com.facebook.buck.rules.keys.ContentAgnosticRuleKeyFactory in project buck by facebook.
the class ActionGraphCacheTest method getRuleKeysFromBuildRules.
private Map<BuildRule, RuleKey> getRuleKeysFromBuildRules(Iterable<BuildRule> buildRules, BuildRuleResolver buildRuleResolver) {
RuleKeyFieldLoader ruleKeyFieldLoader = new RuleKeyFieldLoader(0);
SourcePathRuleFinder ruleFinder = new SourcePathRuleFinder(buildRuleResolver);
SourcePathResolver pathResolver = new SourcePathResolver(ruleFinder);
ContentAgnosticRuleKeyFactory factory = new ContentAgnosticRuleKeyFactory(ruleKeyFieldLoader, pathResolver, ruleFinder);
HashMap<BuildRule, RuleKey> ruleKeysMap = new HashMap<>();
for (BuildRule rule : buildRules) {
ruleKeysMap.put(rule, factory.build(rule));
}
return ruleKeysMap;
}
Aggregations