use of org.gradle.model.RuleSource 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);
}
}
use of org.gradle.model.RuleSource in project gradle by gradle.
the class RuleBasedPluginTarget method applyRules.
@Override
public void applyRules(@Nullable String pluginId, Class<?> clazz) {
target.prepareForRuleBasedPlugins();
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