public MavenPublication create(final String name) { Module module = dependencyMetaDataProvider.getModule(); MavenProjectIdentity projectIdentity = new DefaultMavenProjectIdentity(module.getGroup(), module.getName(), module.getVersion()); NotationParser<Object, MavenArtifact> artifactNotationParser = new MavenArtifactNotationParserFactory(instantiator, fileResolver).create(); return instantiator.newInstance( DefaultMavenPublication.class, name, projectIdentity, artifactNotationParser, instantiator, projectDependencyResolver, fileCollectionFactory ); }
public static List<DefaultMavenPublication> getMavenPublications(Project project) { List<DefaultMavenPublication> xdeps = new ArrayList<>(); PublishingExtension publishingExtension = getPublishingExtension(project); if (publishingExtension != null) { PublicationContainer publicationContainer = publishingExtension.getPublications(); for (Publication publication : publicationContainer) { xdeps.add((DefaultMavenPublication)publication); } } return xdeps; }
public MavenPublication create(final String name) { Module module = dependencyMetaDataProvider.getModule(); MavenProjectIdentity projectIdentity = new DefaultMavenProjectIdentity(module.getGroup(), module.getName(), module.getVersion()); NotationParser<Object, MavenArtifact> artifactNotationParser = new MavenArtifactNotationParserFactory(instantiator, fileResolver).create(); return instantiator.newInstance( DefaultMavenPublication.class, name, projectIdentity, artifactNotationParser, instantiator, projectDependencyResolver ); }