Package org.gradle.api.artifacts.component

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


    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);
        }

        return false;
    }
View Full Code Here


        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

    private final UnresolvedDependencyResult dependency;
    private final ModuleComponentIdentifier actual;

    public UnresolvedDependencyEdge(UnresolvedDependencyResult dependency) {
        this.dependency = dependency;
        ModuleComponentSelector attempted = (ModuleComponentSelector)dependency.getAttempted();
        actual = DefaultModuleComponentIdentifier.newId(attempted.getGroup(), attempted.getModule(), attempted.getVersion());
    }
View Full Code Here

    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());
        }

        return false;
    }
View Full Code Here

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

        if(requested instanceof ModuleComponentSelector && selected instanceof ModuleComponentIdentifier) {
            ModuleComponentSelector requestedModuleComponentSelector = (ModuleComponentSelector)requested;
            ModuleComponentIdentifier selectedModuleComponentedIdentifier = (ModuleComponentIdentifier)selected;

            if(isSameGroupAndModuleButDifferentVersion(requestedModuleComponentSelector, selectedModuleComponentedIdentifier)) {
                return getSimpleName() + " -> " + selectedModuleComponentedIdentifier.getVersion();
            }
View Full Code Here

        if(value == null) {
            throw new IllegalArgumentException("Provided component selector may not be null");
        }

        if(value instanceof DefaultModuleComponentSelector) {
            ModuleComponentSelector moduleComponentSelector = (ModuleComponentSelector)value;
            encoder.writeByte(Implementation.MODULE.getId());
            encoder.writeString(moduleComponentSelector.getGroup());
            encoder.writeString(moduleComponentSelector.getModule());
            encoder.writeString(moduleComponentSelector.getVersion());
        } else if(value instanceof DefaultProjectComponentSelector) {
            ProjectComponentSelector projectComponentSelector = (ProjectComponentSelector)value;
            encoder.writeByte(Implementation.BUILD.getId());
            encoder.writeString(projectComponentSelector.getProjectPath());
        } else {
View Full Code Here

TOP

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

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.