diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2021-12-11 20:29:42 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-10-25 23:03:39 +0200 |
commit | e7a73f171050746efe0798a98e5499028a707c0b (patch) | |
tree | 2de79ff15b6ba2fb3100748cbeafaec18e584a22 /ui/build.gradle.kts | |
parent | 0a8de709b6ee34af39a96d62ec825d0daadd964d (diff) |
version: automatically generate version string from tagversion
Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
Diffstat (limited to 'ui/build.gradle.kts')
-rw-r--r-- | ui/build.gradle.kts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/build.gradle.kts b/ui/build.gradle.kts index 5cdcb6a1..be11cc30 100644 --- a/ui/build.gradle.kts +++ b/ui/build.gradle.kts @@ -9,6 +9,7 @@ plugins { alias(libs.plugins.android.application) alias(libs.plugins.kotlin.android) alias(libs.plugins.kotlin.kapt) + alias(libs.plugins.ajoberstar.grgit) } android { @@ -24,7 +25,10 @@ android { minSdk = 21 targetSdk = 34 versionCode = providers.gradleProperty("wireguardVersionCode").get().toInt() - versionName = providers.gradleProperty("wireguardVersionName").get() + versionName = grgit.describe { + tags = true + always = true + }.replace('-', '.') buildConfigField("int", "MIN_SDK_VERSION", minSdk.toString()) } compileOptions { |