private List<Artifact> calculateArtifacts(Iterable<GradleDeployDetails> deployDetails) throws Exception {
List<Artifact> artifacts = newArrayList(transform(deployDetails, new Function<GradleDeployDetails, Artifact>() {
public Artifact apply(GradleDeployDetails from) {
PublishArtifactInfo publishArtifact = from.getPublishArtifact();
DeployDetails deployDetails = from.getDeployDetails();
String artifactPath = deployDetails.getArtifactPath();
int index = artifactPath.lastIndexOf('/');
return new ArtifactBuilder(artifactPath.substring(index + 1))
.type(getTypeString(publishArtifact.getType(),
publishArtifact.getClassifier(), publishArtifact.getExtension()))
.md5(deployDetails.getMd5()).sha1(deployDetails.getSha1()).build();
}
}));
return artifacts;
}