Project.MSG_DEBUG);
ModuleRevisionId id = artifactsReport.getArtifact().getModuleRevisionId();
String type = getType(artifactsReport.getArtifact());
Dependency dependency = findDependencyInList(id, type, moduleDependencies);
if (dependency == null) {
DependencyBuilder dependencyBuilder = new DependencyBuilder();
dependencyBuilder.type(type).scopes(Lists.newArrayList(configuration));
String idString = getModuleIdString(id.getOrganisation(),
id.getName(), id.getRevision());
dependencyBuilder.id(idString);
File file = artifactsReport.getLocalFile();
Map<String, String> checksums;
try {
checksums = FileChecksumCalculator.calculateChecksums(file, MD5, SHA1);
} catch (Exception e) {
throw new RuntimeException(e);
}
String md5 = checksums.get(MD5);
String sha1 = checksums.get(SHA1);
dependencyBuilder.md5(md5).sha1(sha1);
dependency = dependencyBuilder.build();
moduleDependencies.add(dependency);
project.log(
"[buildinfo:collect] Added dependency '" + dependency.getId() + "'", Project.MSG_DEBUG);
} else {
if (!dependency.getScopes().contains(configuration)) {