use of com.walmartlabs.concord.policyengine.DependencyVersionsPolicy.Dependency in project concord by walmartlabs.
the class JobDependencies method getDependencyVersions.
private static Map<String, String> getDependencyVersions(RunnerJob job) throws ExecutionException {
Map<String, String> result = getDependencyVersionsFromFile(job);
PolicyEngine pe = job.getPolicyEngine();
if (pe != null) {
// make mutable
result = new HashMap<>(result);
result.putAll(pe.getDefaultDependencyVersionsPolicy().get().stream().collect(Collectors.toMap(Dependency::getArtifact, Dependency::getVersion)));
}
return result;
}
Aggregations