use of com.google.cloud.tools.opensource.classpath.DependencyMediation in project cloud-opensource-java by GoogleCloudPlatform.
the class DashboardMain method generate.
private static Path generate(Bom bom, DependencyMediationAlgorithm dependencyMediationAlgorithm) throws IOException, TemplateException, URISyntaxException, InvalidVersionSpecificationException {
ImmutableList<Artifact> managedDependencies = bom.getManagedDependencies();
DependencyMediation dependencyMediation = dependencyMediationAlgorithm == DependencyMediationAlgorithm.MAVEN ? DependencyMediation.MAVEN : GradleDependencyMediation.withEnforcedPlatform(bom);
ClassPathResult classPathResult = classPathBuilder.resolve(managedDependencies, false, dependencyMediation);
ImmutableList<ClassPathEntry> classpath = classPathResult.getClassPath();
LinkageChecker linkageChecker = LinkageChecker.create(classpath);
ImmutableSet<LinkageProblem> linkageProblems = linkageChecker.findLinkageProblems();
ArtifactCache cache = loadArtifactInfo(managedDependencies);
Path output = generateHtml(bom, cache, classPathResult, linkageProblems);
return output;
}
Aggregations