From a37489f451fecab3b84b338a951546c570575b85 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 8 Nov 2024 21:57:21 +0100 Subject: [PATCH] =?utf8?q?=F0=9F=92=9A=20Change=20name=20of=20output=20fil?= =?utf8?q?e=20(and=20for=20some=20reason,=20fix=20build=3F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- build.gradle | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) 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 { -- 2.7.4