Skip to content

Commit 2740cbd

Browse files
author
Dmitry Tretyakov
committed
Refactor code
1 parent 4906dc0 commit 2740cbd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

app/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ def getGitHubCommit = {
99
def changeOutput = new ByteArrayOutputStream()
1010
def gitVersionName = ""
1111

12-
providers.exec {
13-
commandLine 'git', 'rev-list', '--max-count=1', 'HEAD'
14-
standardOutput = hashOutput
12+
execOperations.exec {
13+
it.commandLine 'git', 'rev-list', '--max-count=1', 'HEAD'
14+
it.standardOutput = hashOutput
1515
}
1616

17-
providers.exec {
18-
commandLine 'git', 'diff-index', '--shortstat', 'HEAD'
19-
standardOutput = changeOutput
17+
execOperations.exec {
18+
it.commandLine 'git', 'diff-index', '--shortstat', 'HEAD'
19+
it.standardOutput = changeOutput
2020
}
2121

22-
tasks.gitVersionName = hashOutput.toString().trim().substring(0, 7);
22+
gitVersionName = hashOutput.toString().trim().substring(0, 7);
2323
if (!changeOutput.toString().trim().empty) {
2424
def pattern = Pattern.compile("\\d+");
2525
def matcher = pattern.matcher(changeOutput.toString().trim())

0 commit comments

Comments
 (0)