use of org.gradle.api.publish.maven.internal.publication.MavenPomInternal in project gradle by gradle.
the class GenerateMavenPom method doGenerate.
@TaskAction
public void doGenerate() {
MavenPomInternal pomInternal = (MavenPomInternal) getPom();
MavenPomFileGenerator pomGenerator = new MavenPomFileGenerator(pomInternal.getProjectIdentity(), getVersionRangeMapper());
pomGenerator.setPackaging(pomInternal.getPackaging());
for (MavenDependencyInternal runtimeDependency : pomInternal.getApiDependencies()) {
pomGenerator.addApiDependency(runtimeDependency);
}
for (MavenDependencyInternal runtimeDependency : pomInternal.getRuntimeDependencies()) {
pomGenerator.addRuntimeDependency(runtimeDependency);
}
pomGenerator.withXml(pomInternal.getXmlAction());
pomGenerator.writeTo(getDestination());
}
Aggregations