Fixing version from commandline

This commit is contained in:
Ziver Koc 2024-09-17 23:04:17 +02:00
parent 4cbbabd0e1
commit 5b8b69e7ef
2 changed files with 2 additions and 2 deletions

View file

@ -42,7 +42,7 @@ dependencies {
} }
group = 'se.koc' group = 'se.koc'
version = '1.0.0-SNAPSHOT' version = project.hasProperty('version') ? project.property('version') : '1.0.0-SNAPSHOT'
sourceCompatibility = 1.8 sourceCompatibility = 1.8
targetCompatibility = 1.8 targetCompatibility = 1.8
compileJava.options.encoding = 'UTF-8' compileJava.options.encoding = 'UTF-8'

View file

@ -9,7 +9,7 @@ publishing {
maven { maven {
def snapshotsRepoUrl = 'http://oss.sonatype.org/content/repositories/snapshots/' def snapshotsRepoUrl = 'http://oss.sonatype.org/content/repositories/snapshots/'
def releasesRepoUrl = 'http://oss.sonatype.org/service/local/staging/deploy/maven2/' 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')) { if (project.hasProperty('mavenCentralUsername') && project.hasProperty('mavenCentralPassword')) {
credentials { credentials {