From 543a683a5f843bb7f83814848c96319ee7ab7ec9 Mon Sep 17 00:00:00 2001 From: mcrcortex <18544518+MCRcortex@users.noreply.github.com> Date: Sun, 20 Apr 2025 20:37:38 +1000 Subject: [PATCH] fixed deprecations in buildscript --- build.gradle | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index 4737bcde..14cf004a 100644 --- a/build.gradle +++ b/build.gradle @@ -18,24 +18,22 @@ repositories { includeGroup "maven.modrinth" } } - maven { url "https://maven.shedaniel.me/" } - maven { url "https://maven.terraformersmc.com/releases/" } + maven { url = "https://maven.shedaniel.me/" } + maven { url = "https://maven.terraformersmc.com/releases/" } } def gitCommitHash = { -> try { - def stdout = new ByteArrayOutputStream() - ExecResult result = exec () -> { - commandLine 'git', 'rev-parse', '--short', 'HEAD' - standardOutput = stdout + ExecOutput result = providers.exec { + commandLine = ['git', 'rev-parse', '--short', 'HEAD'] ignoreExitValue = true } - if (result.getExitValue() != 0) { + if (result.getResult().get().getExitValue() != 0) { return ""; } else { - return stdout.toString().trim(); + return result.standardOutput.asText.get(); } } catch (Exception e) { e.printStackTrace() @@ -49,7 +47,6 @@ processResources { def hash = gitCommitHash() inputs.properties("version": project.version, "commit": hash, "buildtime": time) - archivesBaseName = "voxy" filesMatching("fabric.mod.json") { expand "version": project.version, "commit": hash, "buildtime": time } @@ -122,7 +119,6 @@ java { if (JavaVersion.current() < javaVersion) { toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion) } - archivesBaseName = project.archives_base_name // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task // if it is present. @@ -132,7 +128,7 @@ java { jar { from("LICENSE") { - rename { "${it}_${project.archivesBaseName}"} + rename { "${it}_${project.archives_base_name}"} } } @@ -140,7 +136,7 @@ jar { tasks.register('makeExcludedRocksDB', Zip) { archiveExtension.set("jar") - entryCompression(ZipEntryCompression.STORED) + entryCompression = ZipEntryCompression.STORED destinationDirectory.set temporaryDir dependsOn configurations.includeInternal