import java.text.SimpleDateFormat
jar {
archiveBaseName = project.ext.artifactId
archiveVersion = project.ext.version
// Create a timestamp string
def buildDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").format(new Date())
manifest {
attributes(
"Built-By": System.getProperty("user.name"),
"Implementation-Version": archiveVersion,
"Build-Date": buildDate, // New attribute
"Build-Jdk": "${System.getProperty('java.version')} (${System.getProperty('java.vendor')})",
"Build-OS": "${System.getProperty('os.name')} ${System.getProperty('os.arch')}",
"Compile-Source-JDK": project.sourceCompatibility,
"Compile-Target-JDK": project.targetCompatibility
)
}
}
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)