fixed deprecations in buildscript

This commit is contained in:
mcrcortex
2025-04-20 20:37:38 +10:00
parent 89eddde7d4
commit 543a683a5f

View File

@@ -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 "<UnknownCommit>";
} 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