Skip to content

Instantly share code, notes, and snippets.

@erics
Last active June 2, 2023 20:40
Show Gist options
  • Save erics/1c6e333b70508be01c884b7e54d8cfbf to your computer and use it in GitHub Desktop.
Save erics/1c6e333b70508be01c884b7e54d8cfbf to your computer and use it in GitHub Desktop.
execute git command in gradle
def getGitCommand = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'log','--date=local','--name-status','--after="2018.07.19"'
standardOutput = stdout
}
return stdout.toString().trim()
}
task prinGitLog{
println getGitCommand()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment