Class PublicationUtils

java.lang.Object
org.jfrog.gradle.plugin.artifactory.utils.PublicationUtils

public class PublicationUtils extends Object
  • 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 task
      publishingExtension - - 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 artifacts
      publisher - - publisher handler of the project
      destination - - 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 details
      publicationName - - The publication name that published this artifact
      builder - - Deploy details builder
      artifactInfo - - The artifact info
      artifactPath - - 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 file
      publicationName - - the publication name that published this artifact
      Returns:
      DeployDetails.Builder configured for Gradle artifact