daily pastebin goal
83%
SHARE
TWEET

Untitled

a guest Dec 19th, 2018 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. task gitVersion(type: Exec) {
  2.   commandLine 'git', 'describe'
  3.   standardOutput = new ByteArrayOutputStream()
  4.   ext.output = {
  5.     return standardOutput.toString()
  6.   }
  7. }
  8.    
  9. processResources {
  10.   dependsOn gitVersion
  11.   filesMatching('build.properties') {
  12.     expand 'buildVersion': "${version}+${gitVersion.output()}"
  13.   }
  14. }
  15.    
  16. jar {
  17.   manifest {
  18.     attributes(
  19.       // Other attributes
  20.       'Implementation-Version': "${version}+${gitVersion.output()}" // Not working
  21.     )
  22.   }
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top