From 4d96082eb776401f59b94d0b3f17a5c8af3e7097 Mon Sep 17 00:00:00 2001 From: alexVinarskis Date: Wed, 23 Mar 2022 16:42:14 +0100 Subject: [PATCH] Fixed build.gradle that I accidentally broke --- build.gradle | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 539c7af..c8643bf 100644 --- a/build.gradle +++ b/build.gradle @@ -34,13 +34,10 @@ task clean(type: Delete) { } ext { -// gitCommitId = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim() -// gitCommitCount = Integer.parseInt('git rev-list --count HEAD'.execute([], project.rootDir).text.trim()) -// baseVersionName = '5.1.1' -// -// versionCode = gitCommitCount -// versionName = "${baseVersionName}.r${gitCommitCount}.${gitCommitId}" + gitCommitId = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim() + gitCommitCount = Integer.parseInt('git rev-list --count HEAD'.execute([], project.rootDir).text.trim()) + baseVersionName = '5.1.1' - versionCode = 1 - versionName = "1" + versionCode = gitCommitCount + versionName = "${baseVersionName}.r${gitCommitCount}.${gitCommitId}" }