use of org.gradle.api.plugins.buildcomparison.outcome.internal.archive.GeneratedArchiveBuildOutcome in project gradle by gradle.
the class GradleBuildOutcomeSetTransformer method addFileBuildOutcome.
private void addFileBuildOutcome(GradleFileBuildOutcome outcome, ProjectOutcomes rootProject, Set<BuildOutcome> translatedOutcomes) {
if (zipArchiveTypes.contains(outcome.getTypeIdentifier())) {
File originalFile = outcome.getFile();
String relativePath = GFileUtils.relativePath(rootProject.getProjectDirectory(), originalFile);
LocallyAvailableResource resource = null;
if (originalFile.exists()) {
String filestoreDestination = fileStorePrefix + "/" + outcome.getTaskPath() + "/" + originalFile.getName();
resource = fileStore.move(filestoreDestination, originalFile);
}
BuildOutcome buildOutcome = new GeneratedArchiveBuildOutcome(outcome.getTaskPath(), outcome.getDescription(), resource, relativePath);
translatedOutcomes.add(buildOutcome);
} else {
String outcomeName = outcome.getTaskPath();
if (isEmpty(outcomeName)) {
outcomeName = GFileUtils.relativePath(rootProject.getProjectDirectory(), outcome.getFile());
}
translatedOutcomes.add(new UnknownBuildOutcome(outcomeName, outcome.getDescription()));
}
}
Aggregations