Package com.xenoterracide.gradle.git
Class GitMetadataImpl
java.lang.Object
com.xenoterracide.gradle.git.GitMetadataImpl
- All Implemented Interfaces:
GitMetadata
The type Git metadata extension.
-
Method Summary
Modifier and TypeMethodDescription@Nullable Stringbranch()Gets branch.@Nullable Stringcommit()Full 40 character commit SHA.longdistance()Gets commit distance.remotes()Gets the remotes.status()Gets status.@Nullable Stringtag()Gets latest tag.@Nullable StringShort version of a commit SHA.
-
Method Details
-
branch
Gets branch.- Specified by:
branchin interfaceGitMetadata- Returns:
- the branch
-
uniqueShort
Description copied from interface:GitMetadataShort version of a commit SHA.- Specified by:
uniqueShortin interfaceGitMetadata- Returns:
- SHA. Length starts at 8 but may grow as repository does
-
tag
Description copied from interface:GitMetadataGets latest tag.- Specified by:
tagin interfaceGitMetadata- Returns:
- the latest tag
-
distance
public long distance()Description copied from interface:GitMetadataGets commit distance.- Specified by:
distancein interfaceGitMetadata- Returns:
- the commit distance
-
status
Description copied from interface:GitMetadataGets status.- Specified by:
statusin interfaceGitMetadata- Returns:
- the status
-
commit
Full 40 character commit SHA.- Specified by:
commitin interfaceGitMetadata- Returns:
- sha
-
remotes
Description copied from interface:GitMetadataGets the remotes.- Specified by:
remotesin interfaceGitMetadata- Returns:
- the configured remotes or an empty list
-