fix: use gitversion properly

This commit is contained in:
zaaarf 2024-05-08 23:26:10 +02:00
parent 7640b4f6b8
commit 115c4f0470
No known key found for this signature in database
GPG key ID: 102E445F4C3F829B

View file

@ -6,12 +6,10 @@ plugins {
alias libs.plugins.checkerFramework alias libs.plugins.checkerFramework
} }
version = gitVersion() version = versionDetails().lastTag
group = 'ftbsc' group = 'ftbsc'
archivesBaseName = 'bscv' archivesBaseName = 'bscv'
def shortVersion = version.split('-')[0].replaceAll(".dirty", "") // necessary when there are no extra commits on tags, and thus no dash
project.ext { project.ext {
deployJarDo = getProjectProperty("deployJar.do", "false") deployJarDo = getProjectProperty("deployJar.do", "false")
deployJarTargetDir = getProjectProperty("deployJar.targetDir", ".") deployJarTargetDir = getProjectProperty("deployJar.targetDir", ".")
@ -70,7 +68,7 @@ compileJava { //mappings for lillero-processor
} }
jar { jar {
archiveFileName = "${jar.archiveBaseName.get()}-${shortVersion}.${jar.archiveExtension.get()}" archiveFileName = "${jar.archiveBaseName.get()}-${archiveVersion.get()}.${jar.archiveExtension.get()}"
manifest { manifest {
attributes([ attributes([
"Specification-Title": "bscv", "Specification-Title": "bscv",