fixed deprecations in buildscript
This commit is contained in:
20
build.gradle
20
build.gradle
@@ -18,24 +18,22 @@ repositories {
|
|||||||
includeGroup "maven.modrinth"
|
includeGroup "maven.modrinth"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
maven { url "https://maven.shedaniel.me/" }
|
maven { url = "https://maven.shedaniel.me/" }
|
||||||
maven { url "https://maven.terraformersmc.com/releases/" }
|
maven { url = "https://maven.terraformersmc.com/releases/" }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def gitCommitHash = { ->
|
def gitCommitHash = { ->
|
||||||
try {
|
try {
|
||||||
def stdout = new ByteArrayOutputStream()
|
ExecOutput result = providers.exec {
|
||||||
ExecResult result = exec () -> {
|
commandLine = ['git', 'rev-parse', '--short', 'HEAD']
|
||||||
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
|
||||||
standardOutput = stdout
|
|
||||||
ignoreExitValue = true
|
ignoreExitValue = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.getExitValue() != 0) {
|
if (result.getResult().get().getExitValue() != 0) {
|
||||||
return "<UnknownCommit>";
|
return "<UnknownCommit>";
|
||||||
} else {
|
} else {
|
||||||
return stdout.toString().trim();
|
return result.standardOutput.asText.get();
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
@@ -49,7 +47,6 @@ processResources {
|
|||||||
def hash = gitCommitHash()
|
def hash = gitCommitHash()
|
||||||
inputs.properties("version": project.version, "commit": hash, "buildtime": time)
|
inputs.properties("version": project.version, "commit": hash, "buildtime": time)
|
||||||
|
|
||||||
archivesBaseName = "voxy"
|
|
||||||
filesMatching("fabric.mod.json") {
|
filesMatching("fabric.mod.json") {
|
||||||
expand "version": project.version, "commit": hash, "buildtime": time
|
expand "version": project.version, "commit": hash, "buildtime": time
|
||||||
}
|
}
|
||||||
@@ -122,7 +119,6 @@ java {
|
|||||||
if (JavaVersion.current() < javaVersion) {
|
if (JavaVersion.current() < javaVersion) {
|
||||||
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
|
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
|
||||||
}
|
}
|
||||||
archivesBaseName = project.archives_base_name
|
|
||||||
|
|
||||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||||
// if it is present.
|
// if it is present.
|
||||||
@@ -132,7 +128,7 @@ java {
|
|||||||
|
|
||||||
jar {
|
jar {
|
||||||
from("LICENSE") {
|
from("LICENSE") {
|
||||||
rename { "${it}_${project.archivesBaseName}"}
|
rename { "${it}_${project.archives_base_name}"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,7 +136,7 @@ jar {
|
|||||||
|
|
||||||
tasks.register('makeExcludedRocksDB', Zip) {
|
tasks.register('makeExcludedRocksDB', Zip) {
|
||||||
archiveExtension.set("jar")
|
archiveExtension.set("jar")
|
||||||
entryCompression(ZipEntryCompression.STORED)
|
entryCompression = ZipEntryCompression.STORED
|
||||||
destinationDirectory.set temporaryDir
|
destinationDirectory.set temporaryDir
|
||||||
|
|
||||||
dependsOn configurations.includeInternal
|
dependsOn configurations.includeInternal
|
||||||
|
|||||||
Reference in New Issue
Block a user