From: David ‘Bombe’ Roden Date: Fri, 8 Nov 2024 20:57:21 +0000 (+0100) Subject: 💚 Change name of output file (and for some reason, fix build?) X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=a37489f451fecab3b84b338a951546c570575b85;p=rhynodge.git 💚 Change name of output file (and for some reason, fix build?) --- diff --git a/build.gradle b/build.gradle index a9dfb0d..00dfc77 100644 --- a/build.gradle +++ b/build.gradle @@ -65,7 +65,7 @@ dependencies { } tasks.register('fatJar', Jar) { - archiveBaseName.set(project.name + "-all") + archiveFileName.set(project.name + ".jar") manifest { attributes( "Main-Class": "net.pterodactylus.rhynodge.engine.Starter" @@ -83,22 +83,19 @@ tasks.named('test') { jvmArgs += "--add-opens=java.base/java.util=ALL-UNNAMED" } -tasks.register('createVersion') { - processResources.dependsOn(createVersion) +import org.ajoberstar.grgit.Grgit +def createVersion() { + def gitRepo = Grgit.open(projectDir) + def version = gitRepo.describe() + println("created version dir: " + new File("src/generated/resources").mkdirs()) + new File("src/generated/resources/version.txt").withWriter() { it.write(version) } } tasks.named("processGeneratedResources") { - duplicatesStrategy = DuplicatesStrategy.INCLUDE -} - -import org.ajoberstar.grgit.Grgit -createVersion { - doLast { - def gitRepo = Grgit.open(projectDir) - version = gitRepo.describe() - new File("src/generated/resources").mkdirs() - new File("src/generated/resources/version.txt").withWriter() { it.write(version) } + doFirst { + createVersion() } + duplicatesStrategy = DuplicatesStrategy.INCLUDE } jacoco {