|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gradle.api.DefaultTask
org.ajoberstar.gradle.git.tasks.GitBase
org.ajoberstar.gradle.git.tasks.GitLog
public class GitLog extends GitBase
Task to get the commit log of a local Git repository. The commit log will be stored in a property at the project level. This can be used to print out a list of commits as follows:
task log(type: org.ajoberstar.gradle.git.tasks.GitLog) {
includeRange '580504f', '580504f'
doLast {
log.each { println "$it.abbreviatedId $it.committer.name $it.shortMessage" }
}
}
Method Summary | |
---|---|
void
|
exclude(java.lang.String... excludes)
Adds to the list of commits to exclude from the log. |
java.util.List
|
getExcludes()
Gets the list of commits that will be excluded from the log. |
java.util.List
|
getIncludes()
Gets the list of commits that will be included in the log. |
java.util.List
|
getLog()
Gets the resulting log from this task. |
int
|
getMaxCommits()
Gets the maximum number of commits to get from the commit log. |
int
|
getSkipCommits()
Gets the number of commits from the log to skip before getting the commit output. |
void
|
include(java.lang.String... includes)
Adds to the list of commits to include in the log. |
void
|
includeRange(java.lang.String since, java.lang.String until)
Adds a range of commits to the include/exclude rules. |
void
|
reset()
Gets the commit log and stores it in a project property as configured. |
void
|
setExcludes(java.util.List excludes)
Sets the list of commits to exclude from the log. |
void
|
setIncludes(java.util.List includes)
Sets the list of commits to incldue in the log. |
void
|
setMaxCommits(int maxCommits)
Sets the maximum number of commits to get from the commit log. |
void
|
setSkipCommits(int skipCommits)
Sets the number of commits from the log to skip before getting the commit output. |
Methods inherited from class GitBase | |
---|---|
getGit, getRepoDir, setRepoPath |
Method Detail |
---|
public void exclude(java.lang.String... excludes)
excludes
- list of commits
public java.util.List getExcludes()
public java.util.List getIncludes()
public java.util.List getLog()
@Input public int getMaxCommits()
public int getSkipCommits()
public void include(java.lang.String... includes)
includes
- list of commits
public void includeRange(java.lang.String since, java.lang.String until)
since
- the commit to begin atuntil
- the commit to end at
tion public public void reset()
public void setExcludes(java.util.List excludes)
excludes
- list of commits
public void setIncludes(java.util.List includes)
includes
- list of commits
public void setMaxCommits(int maxCommits)
maxCommits
- the maximum number of commits to retrieve
public void setSkipCommits(int skipCommits)
skipCommits
- the number of commits to set
Groovy Documentation