Search in sources :

Example 1 with UnresolvableConfigurationResult

use of org.gradle.api.tasks.diagnostics.internal.graph.nodes.UnresolvableConfigurationResult in project gradle by gradle.

the class JsonProjectDependencyRenderer method collectModules.

private Set<ModuleIdentifier> collectModules(Configuration configuration) {
    RenderableDependency root;
    if (canBeResolved(configuration)) {
        ResolutionResult result = configuration.getIncoming().getResolutionResult();
        root = new RenderableModuleResult(result.getRoot());
    } else {
        root = new UnresolvableConfigurationResult(configuration);
    }
    Set<ModuleIdentifier> modules = Sets.newHashSet();
    Set<ComponentIdentifier> visited = Sets.newHashSet();
    populateModulesWithChildDependencies(root, visited, modules);
    return modules;
}
Also used : RenderableDependency(org.gradle.api.tasks.diagnostics.internal.graph.nodes.RenderableDependency) UnresolvableConfigurationResult(org.gradle.api.tasks.diagnostics.internal.graph.nodes.UnresolvableConfigurationResult) ResolutionResult(org.gradle.api.artifacts.result.ResolutionResult) ComponentIdentifier(org.gradle.api.artifacts.component.ComponentIdentifier) ModuleComponentIdentifier(org.gradle.api.artifacts.component.ModuleComponentIdentifier) ModuleIdentifier(org.gradle.api.artifacts.ModuleIdentifier) RenderableModuleResult(org.gradle.api.tasks.diagnostics.internal.graph.nodes.RenderableModuleResult)

Example 2 with UnresolvableConfigurationResult

use of org.gradle.api.tasks.diagnostics.internal.graph.nodes.UnresolvableConfigurationResult in project gradle by gradle.

the class JsonProjectDependencyRenderer method createDependencies.

private List<Map<String, Object>> createDependencies(Configuration configuration) {
    if (canBeResolved(configuration)) {
        ResolutionResult result = configuration.getIncoming().getResolutionResult();
        RenderableDependency root = new RenderableModuleResult(result.getRoot());
        return createDependencyChildren(root, new HashSet<>());
    } else {
        return createDependencyChildren(new UnresolvableConfigurationResult(configuration), new HashSet<>());
    }
}
Also used : RenderableDependency(org.gradle.api.tasks.diagnostics.internal.graph.nodes.RenderableDependency) UnresolvableConfigurationResult(org.gradle.api.tasks.diagnostics.internal.graph.nodes.UnresolvableConfigurationResult) ResolutionResult(org.gradle.api.artifacts.result.ResolutionResult) RenderableModuleResult(org.gradle.api.tasks.diagnostics.internal.graph.nodes.RenderableModuleResult)

Example 3 with UnresolvableConfigurationResult

use of org.gradle.api.tasks.diagnostics.internal.graph.nodes.UnresolvableConfigurationResult in project gradle by gradle.

the class AsciiDependencyReportRenderer method render.

@Override
public void render(Configuration configuration) {
    if (canBeResolved(configuration)) {
        ResolutionResult result = configuration.getIncoming().getResolutionResult();
        RenderableDependency root = new RenderableModuleResult(result.getRoot());
        renderNow(root);
    } else {
        renderNow(new UnresolvableConfigurationResult(configuration));
    }
}
Also used : RenderableDependency(org.gradle.api.tasks.diagnostics.internal.graph.nodes.RenderableDependency) UnresolvableConfigurationResult(org.gradle.api.tasks.diagnostics.internal.graph.nodes.UnresolvableConfigurationResult) ResolutionResult(org.gradle.api.artifacts.result.ResolutionResult) RenderableModuleResult(org.gradle.api.tasks.diagnostics.internal.graph.nodes.RenderableModuleResult)

Aggregations

ResolutionResult (org.gradle.api.artifacts.result.ResolutionResult)3 RenderableDependency (org.gradle.api.tasks.diagnostics.internal.graph.nodes.RenderableDependency)3 RenderableModuleResult (org.gradle.api.tasks.diagnostics.internal.graph.nodes.RenderableModuleResult)3 UnresolvableConfigurationResult (org.gradle.api.tasks.diagnostics.internal.graph.nodes.UnresolvableConfigurationResult)3 ModuleIdentifier (org.gradle.api.artifacts.ModuleIdentifier)1 ComponentIdentifier (org.gradle.api.artifacts.component.ComponentIdentifier)1 ModuleComponentIdentifier (org.gradle.api.artifacts.component.ModuleComponentIdentifier)1