blob: e65a133eb04d2e28c2fd7df4fea5e7f67b6be6a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
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
}
}
}
|