use of org.gradle.model.internal.inspect.ExtractedRuleSource in project gradle by gradle.
the class RuleBasedPluginApplicator method applyRules.
public void applyRules(@Nullable String pluginId, Class<?> clazz) {
ModelRegistry modelRegistry = target.getModelRegistry();
Iterable<Class<? extends RuleSource>> declaredSources = ruleDetector.getDeclaredSources(clazz);
for (Class<? extends RuleSource> ruleSource : declaredSources) {
ExtractedRuleSource<?> rules = ruleInspector.extract(ruleSource);
for (Class<?> dependency : rules.getRequiredPlugins()) {
target.getPluginManager().apply(dependency);
}
modelRegistry.getRoot().applyToSelf(rules);
}
}
Aggregations