Package org.gradle.api.artifacts.result

Examples of org.gradle.api.artifacts.result.ComponentSelectionReason


        REASONS.put((byte) 6, CONFLICT_RESOLUTION_BY_RULE);
    }

    public ComponentSelectionReason read(Decoder decoder) throws IOException {
        byte id = decoder.readByte();
        ComponentSelectionReason out = REASONS.get(id);
        if (out == null) {
            throw new IllegalArgumentException("Unable to find selection reason with id: " + id);
        }
        return out;
    }
View Full Code Here


    private final ComponentSelectionReasonSerializer reasonSerializer = new ComponentSelectionReasonSerializer();
    private final ComponentIdentifierSerializer componentIdSerializer = new ComponentIdentifierSerializer();

    public ModuleVersionSelection read(Decoder decoder) throws IOException {
        ModuleVersionIdentifier id = idSerializer.read(decoder);
        ComponentSelectionReason reason = reasonSerializer.read(decoder);
        ComponentIdentifier componentId = componentIdSerializer.read(decoder);
        return new DefaultModuleVersionSelection(id, reason, componentId);
    }
View Full Code Here

        byte resultByte = decoder.readByte();
        if (resultByte == SUCCESSFUL) {
            ModuleVersionIdentifier selected = moduleVersionIdentifierSerializer.read(decoder);
            return new DefaultInternalDependencyResult(requested, selected, null, null);
        } else if (resultByte == FAILED) {
            ComponentSelectionReason reason = componentSelectionReasonSerializer.read(decoder);
            ModuleVersionResolveException failure = failures.get(requested);
            return new DefaultInternalDependencyResult(requested, null, reason, failure);
        } else {
            throw new IllegalArgumentException("Unknown result byte: " + resultByte);
        }
View Full Code Here

TOP

Related Classes of org.gradle.api.artifacts.result.ComponentSelectionReason

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.