From 305855757205639f4b8319fb81f312a8b6458bb9 Mon Sep 17 00:00:00 2001 From: Ignas Mikalajunas Date: Sat, 23 Dec 2023 03:43:20 +0200 Subject: [PATCH] Get version if set in command line --- build.gradle | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index f0be478..73a323a 100644 --- a/build.gradle +++ b/build.gradle @@ -8,8 +8,11 @@ plugins { id 'com.ryandens.javaagent-application' version "0.4.2" } +def rawVersion = project.hasProperty('version') ? project.version : '0.1.0-SNAPSHOT' +def versionWithoutPrefix = rawVersion.replaceAll('^v', '') + group = 'lt.pow.nukagit' -version = '0.1-SNAPSHOT' +version = versionWithoutPrefix mainClassName = 'lt.pow.nukagit.Main' repositories {