Class GitMetadataImpl

java.lang.Object
com.xenoterracide.gradle.git.GitMetadataImpl
All Implemented Interfaces:
GitMetadata

public class GitMetadataImpl extends Object implements GitMetadata
The type Git metadata extension.
  • Method Details

    • branch

      public @Nullable String branch()
      Gets branch.
      Specified by:
      branch in interface GitMetadata
      Returns:
      the branch
    • uniqueShort

      public @Nullable String uniqueShort()
      Description copied from interface: GitMetadata
      Short version of a commit SHA.
      Specified by:
      uniqueShort in interface GitMetadata
      Returns:
      SHA. Length starts at 8 but may grow as repository does
    • tag

      public @Nullable String tag()
      Description copied from interface: GitMetadata
      Gets latest tag.
      Specified by:
      tag in interface GitMetadata
      Returns:
      the latest tag
    • distance

      public long distance()
      Description copied from interface: GitMetadata
      Gets commit distance.
      Specified by:
      distance in interface GitMetadata
      Returns:
      the commit distance
    • status

      public GitStatus status()
      Description copied from interface: GitMetadata
      Gets status.
      Specified by:
      status in interface GitMetadata
      Returns:
      the status
    • commit

      public @Nullable String commit()
      Full 40 character commit SHA.
      Specified by:
      commit in interface GitMetadata
      Returns:
      sha
    • remotes

      public List<GitRemote> remotes()
      Description copied from interface: GitMetadata
      Gets the remotes.
      Specified by:
      remotes in interface GitMetadata
      Returns:
      the configured remotes or an empty list