Interface GolangDependency

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ALL_DESCENDANTS
      All descendants files and directories.
      static java.lang.String ONLY_CURRENT_FILES
      Only files located in repo root.
      • Fields inherited from interface org.gradle.api.artifacts.Dependency

        ARCHIVES_CONFIGURATION, CLASSIFIER, DEFAULT_CONFIGURATION
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      CacheScope getCacheScope()
      Get cache scope of this dependency.
      java.lang.String getName()
      The dependency's import path, e.g., golang.org/x/crypto/cmd.
      GolangPackage getPackage()
      Get the package this dependency stands for.
      java.util.Set<java.lang.String> getSubpackages()
      This dependencies sub packages.
      java.lang.String getVersion()
      An unique identifier to locate a dependency, e.g., git commit id.
      boolean isFirstLevel()
      A dependency is said to be "first-level" when it is defined in build.gradle or gogradle.lock of root project.
      ResolvedDependency resolve​(ResolveContext context)
      Resolve to a concrete dependency which can be located to a specific version of code.
      • Methods inherited from interface org.gradle.api.artifacts.Dependency

        because, contentEquals, copy, getGroup, getReason
    • Field Detail

      • ALL_DESCENDANTS

        static final java.lang.String ALL_DESCENDANTS
        All descendants files and directories.
        See Also:
        Constant Field Values
      • ONLY_CURRENT_FILES

        static final java.lang.String ONLY_CURRENT_FILES
        Only files located in repo root.
        See Also:
        Constant Field Values
    • Method Detail

      • getName

        java.lang.String getName()
        The dependency's import path, e.g., golang.org/x/crypto/cmd. However, currently we support golang.org/x/crypto (the root path) only.
        Specified by:
        getName in interface org.gradle.api.artifacts.Dependency
        Returns:
        dependency's import path
      • getVersion

        java.lang.String getVersion()
        An unique identifier to locate a dependency, e.g., git commit id.
        Specified by:
        getVersion in interface org.gradle.api.artifacts.Dependency
        Returns:
        the version string
      • resolve

        ResolvedDependency resolve​(ResolveContext context)
        Resolve to a concrete dependency which can be located to a specific version of code.
        Parameters:
        context - the resolve context
        Returns:
        resolved dependency
      • isFirstLevel

        boolean isFirstLevel()
        A dependency is said to be "first-level" when it is defined in build.gradle or gogradle.lock of root project.
        Returns:
        true if it is "first-level", false otherwise.
      • getCacheScope

        CacheScope getCacheScope()
        Get cache scope of this dependency.
        Returns:
        the cache scope
      • getSubpackages

        java.util.Set<java.lang.String> getSubpackages()
        This dependencies sub packages. A sub package is a string representing the relative path to the repo root. This concept is inspired by glide
        Returns:
        the set of sub packages