use of org.gradle.tooling.model.internal.outcomes.GradleFileBuildOutcome in project gradle by gradle.
the class ProjectOutcomesModelBuilder method addArtifacts.
private void addArtifacts(Project project, List<GradleFileBuildOutcome> outcomes) {
Configuration configuration = project.getConfigurations().findByName(Dependency.ARCHIVES_CONFIGURATION);
if (configuration != null) {
for (PublishArtifact artifact : configuration.getArtifacts()) {
GradleFileBuildOutcome outcome = artifactTransformer.transform(artifact, project);
outcomes.add(outcome);
}
}
}
use of org.gradle.tooling.model.internal.outcomes.GradleFileBuildOutcome 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