From 5b8b69e7efd80fdd20148e232e92e08ea9a41227 Mon Sep 17 00:00:00 2001 From: Ziver Koc Date: Tue, 17 Sep 2024 23:04:17 +0200 Subject: [PATCH] Fixing version from commandline --- build.gradle | 2 +- build_publish.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 2096cd6..a449489 100644 --- a/build.gradle +++ b/build.gradle @@ -42,7 +42,7 @@ dependencies { } group = 'se.koc' -version = '1.0.0-SNAPSHOT' +version = project.hasProperty('version') ? project.property('version') : '1.0.0-SNAPSHOT' sourceCompatibility = 1.8 targetCompatibility = 1.8 compileJava.options.encoding = 'UTF-8' diff --git a/build_publish.gradle b/build_publish.gradle index 406d9b1..e9432c8 100644 --- a/build_publish.gradle +++ b/build_publish.gradle @@ -9,7 +9,7 @@ publishing { maven { def snapshotsRepoUrl = 'http://oss.sonatype.org/content/repositories/snapshots/' def releasesRepoUrl = 'http://oss.sonatype.org/service/local/staging/deploy/maven2/' - url = project.hasProperty('release') && !version.endsWith('SNAPSHOT') ? releasesRepoUrl : snapshotsRepoUrl + url = project.hasProperty('release') ? releasesRepoUrl : snapshotsRepoUrl if (project.hasProperty('mavenCentralUsername') && project.hasProperty('mavenCentralPassword')) { credentials {