Skip to content

Commit

Permalink
Add git commit hash and timestamp to manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebemish committed Oct 29, 2023
1 parent 52a89be commit c38d88c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@ gradlePlugin {
}
}

jar {
manifest {
attributes['Specification-Title'] = 'DocPatcher'
attributes['Specification-Version'] = version.toString().split('-')[0].split(/\+/)[0]
attributes['Specification-Vendor'] = 'Luke Bemish'
attributes['Implementation-Title'] = 'DocPatcher'
attributes['Implementation-Version'] = version
attributes['Implementation-Vendor'] = 'Luke Bemish'
attributes['Implementation-Commit'] = managedVersioning.hash.get()
attributes['Implementation-Timestampt'] = managedVersioning.timestamp.get()
}
}

if (System.getenv('GRADLE_PLUGIN_KEY')) {
ext['gradle.publish.key'] = System.getenv('GRADLE_PLUGIN_KEY')
ext['gradle.publish.secret'] = System.getenv('GRADLE_PLUGIN_SECRET')
Expand Down

0 comments on commit c38d88c

Please sign in to comment.