org.gradle.api.internal.artifacts.result.DefaultResolvedDependencyResult Java Examples
The following examples show how to use
org.gradle.api.internal.artifacts.result.DefaultResolvedDependencyResult.
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: CachingDependencyResultFactory.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
public ResolvedDependencyResult createResolvedDependency(ComponentSelector requested, ResolvedComponentResult from, DefaultResolvedComponentResult selected) { List<Object> key = asList(requested, from, selected); if (!resolvedDependencies.containsKey(key)) { resolvedDependencies.put(key, new DefaultResolvedDependencyResult(requested, selected, from)); } return resolvedDependencies.get(key); }
Example #2
Source File: CachingDependencyResultFactory.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
public ResolvedDependencyResult createResolvedDependency(ComponentSelector requested, ResolvedComponentResult from, DefaultResolvedComponentResult selected) { List<Object> key = asList(requested, from, selected); if (!resolvedDependencies.containsKey(key)) { resolvedDependencies.put(key, new DefaultResolvedDependencyResult(requested, selected, from)); } return resolvedDependencies.get(key); }
Example #3
Source File: CachingDependencyResultFactory.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
public ResolvedDependencyResult createResolvedDependency(ComponentSelector requested, ResolvedComponentResult from, DefaultResolvedComponentResult selected) { List<Object> key = asList(requested, from, selected); if (!resolvedDependencies.containsKey(key)) { resolvedDependencies.put(key, new DefaultResolvedDependencyResult(requested, selected, from)); } return resolvedDependencies.get(key); }
Example #4
Source File: CachingDependencyResultFactory.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
public ResolvedDependencyResult createResolvedDependency(ComponentSelector requested, ResolvedComponentResult from, DefaultResolvedComponentResult selected) { List<Object> key = asList(requested, from, selected); if (!resolvedDependencies.containsKey(key)) { resolvedDependencies.put(key, new DefaultResolvedDependencyResult(requested, selected, from)); } return resolvedDependencies.get(key); }
Example #5
Source File: DependencyGroup.java From atlas with Apache License 2.0 | 4 votes |
private Map<String, Set<DependencyResult>>getProjectBundleCompile(Configuration configuration, Set<String> bundleAddedSets){ Map<String,Set<DependencyResult>>bundleMap = new HashMap<>(); configuration.getAllDependencies().forEach(new Consumer<Dependency>() { @Override public void accept(Dependency dependency) { if (dependency instanceof DefaultProjectDependency) { DefaultProjectDependency projectDependency = (DefaultProjectDependency)dependency; String key = "project " + ":" + projectDependency.getName(); if (!bundleAddedSets.contains(key)){ return; } Set<DependencyResult> compileSets = new HashSet<>(); try { Set<ResolvedArtifact> resolvedArtifacts = projectDependency.getDependencyProject().getConfigurations().getByName("compile").getResolvedConfiguration().getResolvedArtifacts(); projectDependency.getDependencyProject().getConfigurations().getByName("compile").getIncoming().getResolutionResult().getRoot().getDependencies().forEach(new Consumer<DependencyResult>() { @Override public void accept(DependencyResult dependencyResult) { if (!mainDexs.contains(dependencyResult.toString())){ compileSets.add(dependencyResult); if (dependencyResult instanceof DefaultResolvedDependencyResult){ ModuleVersionIdentifier moduleVersionIdentifier = ((DefaultResolvedDependencyResult) dependencyResult).getSelected().getModuleVersion(); for (ResolvedArtifact resolvedArtifact:resolvedArtifacts) { if (resolvedArtifact.getModuleVersion().getId().equals(moduleVersionIdentifier)) { bundleCompileId.put(moduleVersionIdentifier, resolvedArtifact); } } } } } }); } catch (UnknownConfigurationException e) { } bundleMap.put(projectDependency.getGroup()+":"+projectDependency.getName(), compileSets); } } }); return bundleMap; }