Class PublicationUtils
java.lang.Object
org.jfrog.gradle.plugin.artifactory.utils.PublicationUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddArtifactInfoToDeployDetails(ArtifactoryTask destination, String publicationName, org.jfrog.build.extractor.clientConfiguration.deploy.DeployDetails.Builder builder, PublishArtifactInfo artifactInfo, String artifactPath) Adds a general artifact to deploy details in the given task destinationstatic voidaddDefaultPublicationsOrArchiveConfigurations(ArtifactoryTask collectDeployDetailsTask, org.gradle.api.publish.PublishingExtension publishingExtension) When running the gradle build from a CI server or JFrog CLI with the 'Project Uses the Artifactory Plugin' option set to false, the init script generated by the CI server sets the 'addPublishDefaultTasks' boolean to true.static voidaddProps(Map<String, String> target, org.jfrog.build.api.multiMap.Multimap<String, CharSequence> props) static org.jfrog.build.extractor.clientConfiguration.deploy.DeployDetails.BuildercreateArtifactBuilder(File file, String publicationName) Creates a DeployDetails.Builder configured for a given Gradle artifactstatic voidextractArchivesDeployDetails(ArtifactoryTask.ArchiveConfigurationData configData, org.jfrog.build.extractor.clientConfiguration.ArtifactoryClientConfiguration.PublisherHandler publisher, ArtifactoryTask destination) Extract archive configuration artifacts, creates deploy details for it and stores them at the given destination
-
Constructor Details
-
PublicationUtils
public PublicationUtils()
-
-
Method Details
-
addDefaultPublicationsOrArchiveConfigurations
public static void addDefaultPublicationsOrArchiveConfigurations(ArtifactoryTask collectDeployDetailsTask, org.gradle.api.publish.PublishingExtension publishingExtension) When running the gradle build from a CI server or JFrog CLI with the 'Project Uses the Artifactory Plugin' option set to false, the init script generated by the CI server sets the 'addPublishDefaultTasks' boolean to true. With 'maven-publish' and 'ivy-publish' plugins - Add the default mavenJava, mavenJavaPlatform, mavenWeb and ivyJava publications if needed. Without publishing extension - Add the archives from the project's configurations.- Parameters:
collectDeployDetailsTask- - The Artifactory taskpublishingExtension- - The publishing extension
-
extractArchivesDeployDetails
public static void extractArchivesDeployDetails(ArtifactoryTask.ArchiveConfigurationData configData, org.jfrog.build.extractor.clientConfiguration.ArtifactoryClientConfiguration.PublisherHandler publisher, ArtifactoryTask destination) Extract archive configuration artifacts, creates deploy details for it and stores them at the given destination- Parameters:
configData- - snapshot of the configuration and its artifactspublisher- - publisher handler of the projectdestination- - task to collect and store the created details
-
addArtifactInfoToDeployDetails
public static void addArtifactInfoToDeployDetails(ArtifactoryTask destination, String publicationName, org.jfrog.build.extractor.clientConfiguration.deploy.DeployDetails.Builder builder, PublishArtifactInfo artifactInfo, String artifactPath) Adds a general artifact to deploy details in the given task destination- Parameters:
destination- - Task to collect and store the created detailspublicationName- - The publication name that published this artifactbuilder- - Deploy details builderartifactInfo- - The artifact infoartifactPath- - The full path string to deploy the artifact
-
addProps
public static void addProps(Map<String, String> target, org.jfrog.build.api.multiMap.Multimap<String, CharSequence> props) -
createArtifactBuilder
public static org.jfrog.build.extractor.clientConfiguration.deploy.DeployDetails.Builder createArtifactBuilder(File file, String publicationName) Creates a DeployDetails.Builder configured for a given Gradle artifact- Parameters:
file- - the artifact filepublicationName- - the publication name that published this artifact- Returns:
- DeployDetails.Builder configured for Gradle artifact
-