blob: e65a133eb04d2e28c2fd7df4fea5e7f67b6be6a7 [file] [log] [blame]
import java.text.SimpleDateFormat
Date buildTimeAndDate = new Date()
ext {
buildTime = new SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate)
buildDate = new SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate)
cedricVersion = '1.51'
}
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
jar {
manifest {
attributes(
'Built-By': System.properties['user.name'],
'Created-By': System.properties['java.version'] + " (" + System.properties['java.vendor'] + " " + System.getProperty("java.vm.version") + ")",
'Build-Date': project.buildTime,
'Build-Time': project.buildDate,
'Specification-Title': project.name,
'Specification-Version': project.version,
)
}
}
publishing {
publications {
mavenCustom(MavenPublication) {
from components.java
artifact sourceJar
groupId 'com.beust'
artifactId 'jcommander'
version project.version
// pom.withXml {
// asNode().children().last() + pomConfig
// }
}
}
}
task install(dependsOn: publishToMavenLocal)
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
publications = ['mavenCustom']
pkg {
repo = 'maven'
name = 'jcommander'
desc = 'Command line parsing for Java'
licenses = ['Apache-2.0']
labels = ['java']
version {
name = project.version //Bintray logical version name
}
}
}