Skip to content

Commit dfbd6cc

Browse files
committed
Add some logging around manifest definition (for testing purposes)
1 parent 25db539 commit dfbd6cc

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

build.gradle

+16-1
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ def isDirty, branchName, gitHash, gitHashFull, commitDistance, lastTag, isCleanT
214214

215215
try {
216216
def gitDetails = versionDetails()
217+
logger.info("Version details {}", gitDetails)
217218
isDirty = gitVersion().endsWith ".dirty"
218219
branchName = gitDetails.branchName ?: "Unknown"
219220
gitHash = gitDetails.gitHash
@@ -222,7 +223,7 @@ try {
222223
lastTag = gitDetails.lastTag
223224
isCleanTag = gitDetails.isCleanTag
224225
} catch (IllegalArgumentException e) {
225-
logger.info "Got an error trying to read VCS metadata from git. It's possible this project is not under VCS control. Using placeholder values for manifest entries."
226+
logger.info("Got an error trying to read VCS metadata from git. It's possible this project is not under VCS control. Using placeholder values for manifest entries.", e)
226227
isDirty = true
227228
branchName = "Unknown"
228229
gitHash = "None"
@@ -232,6 +233,20 @@ try {
232233
isCleanTag = false
233234
}
234235

236+
logger.info """
237+
Building artifacts with manifest attributes:
238+
239+
* Build-Date: ${buildDate}
240+
* Build-Number: ${buildNumber}
241+
* Implementation-Version: ${version}
242+
* Implementation-Sha-Full: ${gitHashFull}
243+
* Implementation-Sha: ${gitHash}
244+
* Implementation-Commit: ${commitDistance}
245+
* Implementation-LastTag: ${lastTag}
246+
* Implementation-Branch: ${branchName}
247+
* Implementation-CleanTag: ${isCleanTag}
248+
* Implementation-Dirty: ${isDirty}
249+
"""
235250
def sharedManifest = java.manifest {
236251
attributes "Application-Name": pluginAppName,
237252
"Build-Date": buildDate,

0 commit comments

Comments
 (0)