Fix more issues
This commit is contained in:
11
build.gradle
11
build.gradle
@@ -6,6 +6,10 @@ plugins {
|
|||||||
version = project.mod_version
|
version = project.mod_version
|
||||||
group = project.maven_group
|
group = project.maven_group
|
||||||
|
|
||||||
|
base {
|
||||||
|
archivesName = project.archives_base_name
|
||||||
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
exclusiveContent {
|
exclusiveContent {
|
||||||
forRepository {
|
forRepository {
|
||||||
@@ -33,7 +37,7 @@ def gitCommitHash = { ->
|
|||||||
if (result.getResult().get().getExitValue() != 0) {
|
if (result.getResult().get().getExitValue() != 0) {
|
||||||
return "<UnknownCommit>";
|
return "<UnknownCommit>";
|
||||||
} else {
|
} else {
|
||||||
return result.standardOutput.asText.get();
|
return result.standardOutput.asText.get().strip();
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
@@ -45,10 +49,11 @@ def buildtime = {System.currentTimeSeconds()}
|
|||||||
processResources {
|
processResources {
|
||||||
def time = buildtime()
|
def time = buildtime()
|
||||||
def hash = gitCommitHash()
|
def hash = gitCommitHash()
|
||||||
inputs.properties("version": project.version, "commit": hash, "buildtime": time)
|
def version = project.version
|
||||||
|
|
||||||
|
inputs.properties("version": version, "commit": hash, "buildtime": time)
|
||||||
filesMatching("fabric.mod.json") {
|
filesMatching("fabric.mod.json") {
|
||||||
expand "version": project.version, "commit": hash, "buildtime": time
|
expand "version": version, "commit": hash, "buildtime": time
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user