Class ExtensionsUtils

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

public class ExtensionsUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getArtifactoryExtension(org.gradle.api.Project project)
    Get the Artifactory extension that is defined at the root project of a given project
    getExtensionWithPublisher(org.gradle.api.Project project)
    Get an extension of a given project that configured a publisher with: contextUrl and repoKey/snapshotRepoKey If the current project didn't configure a publisher tries the parent until one is found
    getOrCreateArtifactoryExtension(org.gradle.api.Project project)
    Get or create if not exists an artifactory extension for a given project
    static org.jfrog.build.extractor.clientConfiguration.ArtifactoryClientConfiguration.PublisherHandler
    getPublisherHandler(org.gradle.api.Project project)
    Get the configured (contextUrl and repoKey/snapshotRepoKey) publisher handler of a given project
    static void
    updateConfig(org.jfrog.build.extractor.clientConfiguration.ArtifactoryClientConfiguration configuration, org.gradle.api.Project project)
    Update and fill a given client configuration with information from: 1) Start parameters 2) System properties 3) special buildInfo properties 4) default publisher attributes

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExtensionsUtils

      public ExtensionsUtils()
  • Method Details

    • getOrCreateArtifactoryExtension

      public static ArtifactoryPluginConvention getOrCreateArtifactoryExtension(org.gradle.api.Project project)
      Get or create if not exists an artifactory extension for a given project
      Parameters:
      project - - the project to fetch/create its extension
      Returns:
      project extension
    • getArtifactoryExtension

      public static ArtifactoryPluginConvention getArtifactoryExtension(org.gradle.api.Project project)
      Get the Artifactory extension that is defined at the root project of a given project
      Parameters:
      project - - the project that will get its root's extension
      Returns:
      Artifactory's extension defined at the root project if exists
    • getExtensionWithPublisher

      public static ArtifactoryPluginConvention getExtensionWithPublisher(org.gradle.api.Project project)
      Get an extension of a given project that configured a publisher with: contextUrl and repoKey/snapshotRepoKey If the current project didn't configure a publisher tries the parent until one is found
      Parameters:
      project - - the project to fetch its publisher configurations
      Returns:
      an Artifactory extension with publisher configured or null if not found
    • getPublisherHandler

      public static org.jfrog.build.extractor.clientConfiguration.ArtifactoryClientConfiguration.PublisherHandler getPublisherHandler(org.gradle.api.Project project)
      Get the configured (contextUrl and repoKey/snapshotRepoKey) publisher handler of a given project
      Parameters:
      project - - the project to fetch its publisher configurations
      Returns:
      a configured publisher handler or null if not found
    • updateConfig

      public static void updateConfig(org.jfrog.build.extractor.clientConfiguration.ArtifactoryClientConfiguration configuration, org.gradle.api.Project project)
      Update and fill a given client configuration with information from: 1) Start parameters 2) System properties 3) special buildInfo properties 4) default publisher attributes
      Parameters:
      configuration - - configuration to update
      project - - project to get parent information and start parameters