Package org.gradle.api.internal.artifacts

Examples of org.gradle.api.internal.artifacts.ModuleInternal


                if (uploadArchives == null) {
                    return;
                }

                ConfigurationInternal configuration = (ConfigurationInternal) uploadArchives.getConfiguration();
                ModuleInternal module = configuration.getModule();
                for (MavenResolver resolver : uploadArchives.getRepositories().withType(MavenResolver.class)) {
                    MavenPom pom = resolver.getPom();
                    ModuleVersionIdentifier publicationId = new DefaultModuleVersionIdentifier(
                            pom.getGroupId().equals(MavenProject.EMPTY_PROJECT_GROUP_ID) ? module.getGroup() : pom.getGroupId(),
                            pom.getArtifactId().equals(MavenProject.EMPTY_PROJECT_ARTIFACT_ID) ? module.getName() : pom.getArtifactId(),
                            pom.getVersion().equals(MavenProject.EMPTY_PROJECT_VERSION) ? module.getVersion() : pom.getVersion()
                    );
                    publicationRegistry.registerPublication(project.getPath(), new DefaultProjectPublication(publicationId));
                }
            }
        });
View Full Code Here


    }

    @TaskAction
    protected void upload() {
        getLogger().info("Publishing configuration: " + configuration);
        ModuleInternal module = ((ConfigurationInternal) configuration).getModule();

        ArtifactPublisher artifactPublisher = getPublicationServices().createArtifactPublisher();
        File descriptorDestination = isUploadDescriptor() ? getDescriptorDestination() : null;
        List<PublicationAwareRepository> publishRepositories = collect(getRepositories(), Transformers.cast(PublicationAwareRepository.class));
View Full Code Here

                boolean hasIvyRepo = !uploadArchives.getRepositories().withType(IvyArtifactRepository.class).isEmpty();
                if (!hasIvyRepo) { return; } // Maven repos are handled by MavenPlugin

                ConfigurationInternal configuration = (ConfigurationInternal) uploadArchives.getConfiguration();
                ModuleInternal module = configuration.getModule();
                ModuleVersionIdentifier publicationId =
                        new DefaultModuleVersionIdentifier(module.getGroup(), module.getName(), module.getVersion());
                publicationRegistry.registerPublication(module.getProjectPath(), new DefaultProjectPublication(publicationId));
            }
        });
    }
View Full Code Here

TOP

Related Classes of org.gradle.api.internal.artifacts.ModuleInternal

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.