We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e15177b commit ceee127Copy full SHA for ceee127
build.gradle
@@ -4,7 +4,7 @@ plugins {
4
}
5
6
archivesBaseName = project.archives_base_name
7
-version = project.mod_version
+version = project.mod_version + "-" + getVersionMetadata()
8
group = project.maven_group
9
10
repositories {
@@ -27,6 +27,18 @@ dependencies {
27
modImplementation "xyz.nucleoid:plasmid:${project.plasmid_version}"
28
29
30
+String getVersionMetadata() {
31
+ var buildId = System.getenv("GITHUB_RUN_NUMBER")
32
+
33
+ // CI builds only
34
+ if (buildId != null) {
35
+ return "build.$buildId"
36
+ }
37
38
+ // No tracking information could be found about the build
39
+ return "snapshot"
40
+}
41
42
processResources {
43
inputs.property "version", project.version
44
0 commit comments