tasks.register('generateTarManifest') {
def manifestFile = layout.buildDirectory.file("tmp/tar-manifest/MANIFEST.MF")
outputs.file(manifestFile)
doLast {
File file = manifestFile.get().asFile
file.parentFile.mkdirs()
Manifest manifest = new Manifest()
def attributes = manifest.mainAttributes
attributes.putValue("Manifest-Version", "1.0")
attributes.putValue("Built-By", System.getProperty('user.name'))
attributes.putValue("Implementation-Version", project.version.toString())
attributes.putValue("Build-Date", new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").format(new Date()))
attributes.putValue("Build-Jdk", "${System.getProperty('java.version')} (${System.getProperty('java.vendor')})")
attributes.putValue("Build-OS", "${System.getProperty('os.name')} ${System.getProperty('os.arch')}")
file.withOutputStream { os ->
manifest.write(os)
}
}
}
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)