Last active
June 2, 2023 20:40
-
-
Save erics/1c6e333b70508be01c884b7e54d8cfbf to your computer and use it in GitHub Desktop.
execute git command in gradle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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