Class ProjectUtils

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

public class ProjectUtils extends Object
  • Constructor Details

    • ProjectUtils

      public ProjectUtils()
  • Method Details

    • isRootProject

      public static boolean isRootProject(org.gradle.api.Project project)
    • getId

      public static String getId(org.gradle.api.Project project)
      Get the ID (Group, artifact and version) of the given module
      Parameters:
      project - - project to extract its Id
      Returns:
      Gav identifier string of the module
    • getId

      public static String getId(String group, String name, String version)
      Get the ID (Group, artifact and version) from stored values.
    • getId

      public static String getId(org.gradle.api.artifacts.ModuleVersionIdentifier module)
      Get the ID (Group, artifact and version) of the given module
      Parameters:
      module - - the module to extract the GAV info
      Returns:
      Gav identifier string of the module or null if module is null
    • hasOneOfComponents

      public static boolean hasOneOfComponents(org.gradle.api.Project project, String... componentNames)
      Check if a given project has at least one of the given components
      Parameters:
      project - - project to check
      componentNames - - components names to check
      Returns:
      true if the given project has at least one of the given components.
    • filterIncludeExcludeDetails

      public static Iterable<GradleDeployDetails> filterIncludeExcludeDetails(String projectPath, org.jfrog.build.extractor.clientConfiguration.ArtifactoryClientConfiguration.PublisherHandler publisher, Set<GradleDeployDetails> gradleDeployDetails, boolean isInclude)
      Filter (Include/Exclude) project deployment details by a given publisher configurations. Uses projectPath string instead of Project reference.
      Parameters:
      projectPath - - project path of the given details
      publisher - - configurations to apply
      gradleDeployDetails - - details to filter
      isInclude - - if true applying include-pattern or exclude-pattern if false
      Returns:
      filtered details by the given input