use of org.gradle.api.publish.ivy.internal.dependency.IvyDependencyInternal in project gradle by gradle.
the class GenerateIvyDescriptor method doGenerate.
@TaskAction
public void doGenerate() {
IvyModuleDescriptorSpecInternal descriptorInternal = toIvyModuleDescriptorInternal(getDescriptor());
IvyDescriptorFileGenerator ivyGenerator = new IvyDescriptorFileGenerator(descriptorInternal.getProjectIdentity());
ivyGenerator.setStatus(descriptorInternal.getStatus());
ivyGenerator.setBranch(descriptorInternal.getBranch());
ivyGenerator.setExtraInfo(descriptorInternal.getExtraInfo().asMap());
for (IvyConfiguration ivyConfiguration : descriptorInternal.getConfigurations()) {
ivyGenerator.addConfiguration(ivyConfiguration);
}
for (IvyArtifact ivyArtifact : descriptorInternal.getArtifacts()) {
ivyGenerator.addArtifact(ivyArtifact);
}
for (IvyDependencyInternal ivyDependency : descriptorInternal.getDependencies()) {
ivyGenerator.addDependency(ivyDependency);
}
ivyGenerator.withXml(descriptorInternal.getXmlAction()).writeTo(getDestination());
}
use of org.gradle.api.publish.ivy.internal.dependency.IvyDependencyInternal in project gradle by gradle.
the class IvyDescriptorFileGenerator method writeDependencies.
private void writeDependencies(OptionalAttributeXmlWriter xmlWriter) throws IOException {
xmlWriter.startElement("dependencies");
for (IvyDependencyInternal dependency : dependencies) {
xmlWriter.startElement("dependency").attribute("org", dependency.getOrganisation()).attribute("name", dependency.getModule()).attribute("rev", dependency.getRevision()).attribute("conf", dependency.getConfMapping());
if (!dependency.isTransitive()) {
xmlWriter.attribute("transitive", "false");
}
for (DependencyArtifact dependencyArtifact : dependency.getArtifacts()) {
printDependencyArtifact(dependencyArtifact, xmlWriter);
}
for (ExcludeRule excludeRule : dependency.getExcludeRules()) {
writeDependencyExclude(excludeRule, xmlWriter);
}
xmlWriter.endElement();
}
xmlWriter.endElement();
}
Aggregations