use of org.gradle.api.publish.maven.MavenArtifact in project gradle by gradle.
the class DefaultMavenArtifactSet method artifact.
@Override
public MavenArtifact artifact(Object source) {
MavenArtifact artifact = mavenArtifactParser.parseNotation(source);
add(artifact);
return artifact;
}
use of org.gradle.api.publish.maven.MavenArtifact in project gradle by gradle.
the class DefaultMavenArtifactSet method artifact.
@Override
public MavenArtifact artifact(Object source, Action<? super MavenArtifact> config) {
MavenArtifact artifact = artifact(source);
config.execute(artifact);
return artifact;
}
use of org.gradle.api.publish.maven.MavenArtifact in project gradle by gradle.
the class ValidatingMavenPublisher method validateArtifacts.
private void validateArtifacts(MavenNormalizedPublication publication) {
for (MavenArtifact artifact : publication.getAllArtifacts()) {
field(publication, "artifact extension", artifact.getExtension()).notNull().validInFileName();
field(publication, "artifact classifier", artifact.getClassifier()).optionalNotEmpty().validInFileName();
checkCanPublish(publication.getName(), artifact);
}
}
use of org.gradle.api.publish.maven.MavenArtifact in project gradle by gradle.
the class ValidatingMavenPublisher method checkNoDuplicateArtifacts.
private void checkNoDuplicateArtifacts(MavenNormalizedPublication publication) {
Set<MavenArtifact> verified = new HashSet<>();
for (MavenArtifact artifact : publication.getAllArtifacts()) {
checkNotDuplicate(publication, verified, artifact.getExtension(), artifact.getClassifier());
verified.add(artifact);
}
}
Aggregations