Skip to content

Commit 2c60e3a

Browse files
committed
Change to nightly version naming (version+hash style) and processTestRes
1 parent dbbfd87 commit 2c60e3a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

build.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ apply plugin: "net.minecraftforge.gradle"
2020
def gitCommitHash = 'git rev-parse --verify --short HEAD'.execute().text.trim()
2121
def isRelease = (System.getenv("CM_RELEASE") ?: "false").equalsIgnoreCase("true")
2222

23-
version = isRelease ? mod_version : "nightly-${gitCommitHash}"
23+
version = isRelease ? mod_version : "${mod_version}+${gitCommitHash}"
2424
group = "dev.compactmods"
2525
archivesBaseName = mod_id
2626

@@ -259,6 +259,10 @@ processResources {
259259
duplicatesStrategy = DuplicatesStrategy.WARN
260260
}
261261

262+
processTestResources {
263+
duplicatesStrategy = DuplicatesStrategy.WARN
264+
}
265+
262266
jar {
263267
from sourceSets.api.output
264268
from sourceSets.main.output
@@ -271,7 +275,7 @@ jar {
271275
"Specification-Vendor" : "robotgryphon",
272276
"Specification-Version" : "1", // We are version 1 of ourselves
273277
"Implementation-Title" : project.name,
274-
"Implementation-Version" : isRelease ? archiveVersion : "nightly-${gitCommitHash}",
278+
"Implementation-Version" : isRelease ? archiveVersion : "${mod_version}+${gitCommitHash}",
275279
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
276280
])
277281
}

0 commit comments

Comments
 (0)