Package org.gradle.api.artifacts.component

Examples of org.gradle.api.artifacts.component.ComponentSelector


            return matchesRequested(candidate);
        }
    }

    private boolean matchesRequested(DependencyResult candidate) {
        ComponentSelector requested = candidate.getRequested();

        if(requested instanceof ModuleComponentSelector) {
            ModuleComponentSelector requestedModule = (ModuleComponentSelector)requested;
            String requestedCandidate = requestedModule.getGroup() + ":" + requestedModule.getModule() + ":" + requestedModule.getVersion();
            return requestedCandidate.contains(stringNotation);
View Full Code Here


    public String getDescription() {
        return null;
    }

    public String getName() {
        ComponentSelector requested = dependency.getRequested();
        ComponentSelector attempted = dependency.getAttempted();

        if(requested.equals(attempted)) {
            return requested.getDisplayName();
        }

        if(requested instanceof ModuleComponentSelector && attempted instanceof ModuleComponentSelector) {
            ModuleComponentSelector requestedSelector = (ModuleComponentSelector)requested;
            ModuleComponentSelector attemptedSelector = (ModuleComponentSelector)attempted;

            if(requestedSelector.getGroup().equals(attemptedSelector.getGroup())
                    && requestedSelector.getModule().equals(attemptedSelector.getModule())
                    && !requestedSelector.getVersion().equals(attemptedSelector.getVersion())) {
                return requested.getDisplayName() + " -> " + ((ModuleComponentSelector) attempted).getVersion();
            }
        }

        return requested.getDisplayName() + " -> " + attempted.getDisplayName();
    }
View Full Code Here

            return matchesRequested(candidate);
        }
    }

    private boolean matchesRequested(DependencyResult candidate) {
        ComponentSelector requested = candidate.getRequested();

        if (moduleIdentifier != null && requested instanceof ModuleComponentSelector) {
            ModuleComponentSelector requestedSelector = (ModuleComponentSelector) requested;
            return requestedSelector.getGroup().equals(moduleIdentifier.getGroup())
                    && requestedSelector.getModule().equals(moduleIdentifier.getName());
View Full Code Here

    public ComponentIdentifier getId() {
        return getActual();
    }

    public String getName() {
        ComponentSelector requested = getRequested();
        ComponentIdentifier selected = getActual();

        if(requested.matchesStrictly(selected)) {
            return getSimpleName();
        }

        if(requested instanceof ModuleComponentSelector && selected instanceof ModuleComponentIdentifier) {
            ModuleComponentSelector requestedModuleComponentSelector = (ModuleComponentSelector)requested;
View Full Code Here

    private final ComponentSelectorSerializer componentSelectorSerializer = new ComponentSelectorSerializer();
    private final ComponentSelectionReasonSerializer componentSelectionReasonSerializer = new ComponentSelectionReasonSerializer();
    private final ModuleVersionIdentifierSerializer moduleVersionIdentifierSerializer = new ModuleVersionIdentifierSerializer();

    public InternalDependencyResult read(Decoder decoder, Map<ComponentSelector, ModuleVersionResolveException> failures) throws IOException {
        ComponentSelector requested = componentSelectorSerializer.read(decoder);
        byte resultByte = decoder.readByte();
        if (resultByte == SUCCESSFUL) {
            ModuleVersionIdentifier selected = moduleVersionIdentifierSerializer.read(decoder);
            return new DefaultInternalDependencyResult(requested, selected, null, null);
        } else if (resultByte == FAILED) {
View Full Code Here

TOP

Related Classes of org.gradle.api.artifacts.component.ComponentSelector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.