use of org.gradle.api.artifacts.PublishArtifactSet in project gradle by gradle.
the class DefaultConfigurationPublications method convertToOutgoingVariant.
public OutgoingVariant convertToOutgoingVariant() {
return new OutgoingVariant() {
@Override
public DisplayName asDescribable() {
return displayName;
}
@Override
public AttributeContainerInternal getAttributes() {
return attributes;
}
@Override
public Set<? extends PublishArtifact> getArtifacts() {
return artifacts;
}
@Override
public Set<? extends OutgoingVariant> getChildren() {
Set<OutgoingVariant> result = new LinkedHashSet<OutgoingVariant>();
PublishArtifactSet allArtifactSet = allArtifacts.getPublishArtifactSet();
if (allArtifactSet.size() > 0 || variants == null) {
result.add(new LeafOutgoingVariant(displayName, attributes, allArtifactSet));
}
if (variants != null) {
for (DefaultVariant variant : variants.withType(DefaultVariant.class)) {
result.add(variant.convertToOutgoingVariant());
}
}
return result;
}
};
}
use of org.gradle.api.artifacts.PublishArtifactSet in project build-info by JFrogDev.
the class TaskHelperConfigurations method getArtifactDeployDetails.
protected Set<GradleDeployDetails> getArtifactDeployDetails() {
Set<GradleDeployDetails> deployDetails = Sets.newLinkedHashSet();
if (!hasConfigurations()) {
log.info("No configurations to publish for project '{}'.", getProject().getPath());
return deployDetails;
}
Set<String> processedFiles = Sets.newHashSet();
for (Configuration configuration : publishConfigurations) {
PublishArtifactSet artifacts = configuration.getAllArtifacts();
for (PublishArtifact artifact : artifacts) {
GradleDeployDetails gdd = gradleDeployDetails(artifact, configuration.getName(), processedFiles);
if (gdd != null) {
deployDetails.add(gdd);
}
}
}
return deployDetails;
}
Aggregations