Java Code Examples for org.gradle.api.artifacts.component.ModuleComponentIdentifier#getVersion()

The following examples show how to use org.gradle.api.artifacts.component.ModuleComponentIdentifier#getVersion() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractRenderableDependencyResult.java    From pushfish-android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
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;
        ModuleComponentIdentifier selectedModuleComponentedIdentifier = (ModuleComponentIdentifier)selected;

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

    return getSimpleName() + " -> " + selected.getDisplayName();
}
 
Example 2
Source File: AbstractRenderableDependencyResult.java    From pushfish-android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
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;
        ModuleComponentIdentifier selectedModuleComponentedIdentifier = (ModuleComponentIdentifier)selected;

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

    return getSimpleName() + " -> " + selected.getDisplayName();
}
 
Example 3
Source File: AbstractRenderableDependencyResult.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
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;
        ModuleComponentIdentifier selectedModuleComponentedIdentifier = (ModuleComponentIdentifier)selected;

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

    return getSimpleName() + " -> " + selected.getDisplayName();
}
 
Example 4
Source File: AbstractRenderableDependencyResult.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
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;
        ModuleComponentIdentifier selectedModuleComponentedIdentifier = (ModuleComponentIdentifier)selected;

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

    return getSimpleName() + " -> " + selected.getDisplayName();
}
 
Example 5
Source File: DefaultModuleVersionIdentifier.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public static ModuleVersionIdentifier newId(ModuleComponentIdentifier componentId) {
    return new DefaultModuleVersionIdentifier(componentId.getGroup(), componentId.getModule(), componentId.getVersion());
}
 
Example 6
Source File: MavenUniqueSnapshotComponentIdentifier.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public MavenUniqueSnapshotComponentIdentifier(ModuleComponentIdentifier baseIdentifier, String timestamp) {
    super(baseIdentifier.getGroup(), baseIdentifier.getModule(), baseIdentifier.getVersion());
    this.timestamp = timestamp;
}
 
Example 7
Source File: DefaultDependencyMetaData.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public DefaultDependencyMetaData(ModuleComponentIdentifier componentIdentifier) {
    dependencyDescriptor = new DefaultDependencyDescriptor(IvyUtil.createModuleRevisionId(componentIdentifier), false);
    requested = new DefaultModuleVersionSelector(componentIdentifier.getGroup(), componentIdentifier.getModule(), componentIdentifier.getVersion());
}
 
Example 8
Source File: DefaultModuleVersionIdentifier.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public static ModuleVersionIdentifier newId(ModuleComponentIdentifier componentId) {
    return new DefaultModuleVersionIdentifier(componentId.getGroup(), componentId.getModule(), componentId.getVersion());
}
 
Example 9
Source File: DefaultModuleVersionIdentifier.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public static ModuleVersionIdentifier newId(ModuleComponentIdentifier componentId) {
    return new DefaultModuleVersionIdentifier(componentId.getGroup(), componentId.getModule(), componentId.getVersion());
}
 
Example 10
Source File: MavenUniqueSnapshotComponentIdentifier.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public MavenUniqueSnapshotComponentIdentifier(ModuleComponentIdentifier baseIdentifier, String timestamp) {
    super(baseIdentifier.getGroup(), baseIdentifier.getModule(), baseIdentifier.getVersion());
    this.timestamp = timestamp;
}
 
Example 11
Source File: DefaultDependencyMetaData.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public DefaultDependencyMetaData(ModuleComponentIdentifier componentIdentifier) {
    dependencyDescriptor = new DefaultDependencyDescriptor(IvyUtil.createModuleRevisionId(componentIdentifier), false);
    requested = new DefaultModuleVersionSelector(componentIdentifier.getGroup(), componentIdentifier.getModule(), componentIdentifier.getVersion());
}
 
Example 12
Source File: DefaultModuleVersionIdentifier.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public static ModuleVersionIdentifier newId(ModuleComponentIdentifier componentId) {
    return new DefaultModuleVersionIdentifier(componentId.getGroup(), componentId.getModule(), componentId.getVersion());
}