Package org.gradle.api.publish

Examples of org.gradle.api.publish.PublicationContainer


        @Mutate
        @SuppressWarnings("UnusedDeclaration")
        public void realizePublishingTasks(CollectionBuilder<Task> tasks, @Path("tasks.publish") Task publishLifecycleTask, @Path("tasks.publishToMavenLocal") Task publishLocalLifecycleTask,
                                           PublishingExtension extension) {
            // Create generatePom tasks for any Maven publication
            PublicationContainer publications = extension.getPublications();

            for (final MavenPublicationInternal publication : publications.withType(MavenPublicationInternal.class)) {
                String publicationName = publication.getName();

                createGeneratePomTask(tasks, publication, publicationName);
                createLocalInstallTask(tasks, publishLocalLifecycleTask, publication, publicationName);
                createPublishTasksForEachMavenRepo(tasks, extension, publishLifecycleTask, publication, publicationName);
View Full Code Here


    @RuleSource
    static class Rules {
        @Mutate
        @SuppressWarnings("UnusedDeclaration")
        public void createTasks(CollectionBuilder<Task> tasks, final @Path("tasks.publish") Task publishLifecycleTask, PublishingExtension publishingExtension) {
            PublicationContainer publications = publishingExtension.getPublications();
            RepositoryHandler repositories = publishingExtension.getRepositories();

            for (final IvyPublicationInternal publication : publications.withType(IvyPublicationInternal.class)) {

                final String publicationName = publication.getName();
                final String descriptorTaskName = String.format("generateDescriptorFileFor%sPublication", capitalize(publicationName));

                tasks.create(descriptorTaskName, GenerateIvyDescriptor.class, new Action<GenerateIvyDescriptor>() {
View Full Code Here

        this.instantiator = instantiator;
    }

    public void apply(final Project project) {
        RepositoryHandler repositories = publicationServices.createRepositoryHandler();
        PublicationContainer publications = instantiator.newInstance(DefaultPublicationContainer.class, instantiator);

        // TODO Registering an extension should register it with the model registry as well
        project.getExtensions().create(PublishingExtension.NAME, DefaultPublishingExtension.class, repositories, publications);

        Task publishLifecycleTask = project.getTasks().create(PUBLISH_LIFECYCLE_TASK_NAME);
View Full Code Here

TOP

Related Classes of org.gradle.api.publish.PublicationContainer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.