Java Code Examples for org.gradle.api.artifacts.component.ComponentIdentifier#getDisplayName()
The following examples show how to use
org.gradle.api.artifacts.component.ComponentIdentifier#getDisplayName() .
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 |
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 |
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: AtlasDependencyGraph.java From atlas with Apache License 2.0 | 6 votes |
@NonNull public static String computeAddress(@NonNull AtlasDependencyGraph.HashableResolvedArtifactResult artifact) { ComponentIdentifier id = artifact.getId().getComponentIdentifier(); if (id instanceof ProjectComponentIdentifier) { String variant = getVariant(artifact); if (variant == null) { return ((ProjectComponentIdentifier) id).getProjectPath().intern(); } else { return (((ProjectComponentIdentifier) id).getProjectPath() + "::" + variant) .intern(); } } else if (id instanceof ModuleComponentIdentifier || id instanceof OpaqueComponentArtifactIdentifier) { MavenCoordinates coordinates = sMavenCoordinatesCache.get(artifact); Optional.of(coordinates); return coordinates.toString().intern(); } else { throw new RuntimeException( "Don't know how to handle ComponentIdentifier '" + id.getDisplayName() + "'of type " + id.getClass()); } }
Example 4
Source File: AbstractRenderableDependencyResult.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
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: AbstractRenderableDependencyResult.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
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(); }