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 3375701 commit 68869b9Copy full SHA for 68869b9
build.gradle
@@ -105,6 +105,10 @@ tasks.named('jar') {
105
manifest.attributes('Multi-Release': 'true')
106
}
107
108
+def gitHashProvider = providers.exec {
109
+ commandLine 'git', 'rev-parse', '--short', 'HEAD'
110
+}.standardOutput.asText.map { it.trim() }
111
+
112
shadowJar {
113
duplicatesStrategy = DuplicatesStrategy.INCLUDE
114
failOnDuplicateEntries = true
@@ -123,6 +127,10 @@ shadowJar {
123
127
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
124
128
125
129
130
+ manifest {
131
+ attributes('Implementation-Version': gitHashProvider.get())
132
+ }
133
126
134
destinationDirectory.set(file('target'))
135
archiveBaseName.set('photon')
136
archiveClassifier.set('')
0 commit comments