Class DependencyExtractor

java.lang.Object
org.jfrog.gradle.plugin.artifactory.extractor.DependencyExtractor

public class DependencyExtractor extends Object
Extracts a module's dependency records (id, type, checksums, scopes and requestedBy paths) from a resolved configuration's ResolvedComponentResult graph and its ResolvedArtifactResults.

This is the configuration-cache-compatible replacement for the old afterResolve listener: it runs inside a lazy provider transform (execution time), reading from the resolution result the configuration cache serializes and reloads on a cache hit. No configuration-time file observation, no build listener that dies when the configuration phase is skipped.

  • Constructor Details

    • DependencyExtractor

      public DependencyExtractor()
  • Method Details

    • extract

      public static List<PreCollectedDependency> extract(String configName, org.gradle.api.artifacts.result.ResolvedComponentResult root, Set<org.gradle.api.artifacts.result.ResolvedArtifactResult> artifacts)
      Extract dependency records for a single resolved configuration.
      Parameters:
      configName - - the configuration name, used as the dependency scope
      root - - the resolved root component of the configuration
      artifacts - - the resolved artifacts of the configuration (lenient view)
      Returns:
      dependency records for this configuration