Search in sources :

Example 1 with PublishableComponent

use of org.gradle.api.component.PublishableComponent in project gradle by gradle.

the class NativeBasePlugin method addPublicationFromVariant.

private void addPublicationFromVariant(SoftwareComponent child, PublishingExtension publishing, Project project) {
    if (child instanceof PublishableComponent) {
        publishing.getPublications().create(child.getName(), MavenPublication.class, publication -> {
            MavenPublicationInternal publicationInternal = (MavenPublicationInternal) publication;
            fillInCoordinates(project, publicationInternal, (PublishableComponent) child);
            publicationInternal.from(child);
            publicationInternal.publishWithOriginalFileName();
        });
    }
}
Also used : MavenPublicationInternal(org.gradle.api.publish.maven.internal.publication.MavenPublicationInternal) PublishableComponent(org.gradle.api.component.PublishableComponent)

Aggregations

PublishableComponent (org.gradle.api.component.PublishableComponent)1 MavenPublicationInternal (org.gradle.api.publish.maven.internal.publication.MavenPublicationInternal)1