From ae2cde3545c4218bf8ef938b02e740f64a604988 Mon Sep 17 00:00:00 2001 From: sora Date: Sat, 23 May 2026 14:06:23 +0200 Subject: [PATCH] Update app/build.gradle --- app/build.gradle | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 246fdf7..83ff6fe 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,3 +1,16 @@ +def getCommitCount() { + try { + def stdout = new ByteArrayOutputStream() + exec { + commandLine 'git', 'rev-list', '--count', 'HEAD' + standardOutput = stdout + } + return stdout.toString().trim().toInteger() + } catch (ignored) { + return 1 + } +} + plugins { id 'com.android.application' id 'org.jetbrains.kotlin.plugin.serialization' version '2.3.21' @@ -15,8 +28,8 @@ android { applicationId 'net.helcel.beans' minSdk = 28 targetSdk = 37 - versionCode 4 - versionName "1.1a" + versionName "1.2" + versionCode getCommitCount() } signingConfigs { register("release") {