-
Notifications
You must be signed in to change notification settings - Fork 0
/
bintray.gradle
105 lines (95 loc) · 3.03 KB
/
bintray.gradle
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
}
}
// https://discuss.gradle.org/t/plugin/7508/2
apply plugin: com.jfrog.bintray.gradle.BintrayPlugin
apply plugin: "maven-publish"
project.ext["signing.keyId"] = '74B2DD02'
project.ext["signing.password"] = System.getenv("GPG_PASSPHRASE") ?: ""
project.ext["signing.secretKeyRingFile"] = file("/tmp/sec.gpg").absolutePath
group = 'com.wtanaka'
project.ext["artifactId"] = 'docopt-kt'
project.ext["websiteUrl"] = 'https://wtanaka.com/'
project.ext["description"] = 'Docopt for Kotlin'
project.ext["githubuser"] = "wtanaka"
project.ext["githubrepo"] = "docopt.kt"
apply from: 'pom.gradle'
def pomConfig = {
licenses {
license {
name "MIT"
url "https://opensource.org/licenses/MIT"
distribution "repo"
}
}
developers {
developer {
id "wtanaka"
name "wtanaka.com"
email "[email protected]"
}
}
scm {
connection "scm:git:git://github.com/" + project.ext['githubuser'] +
"/" + project.ext['githubrepo'] + ".git"
developerConnection "scm:git:ssh://github.com:" +
project.ext['githubuser'] +
"/" + project.ext['githubrepo'] + ".git"
url "https://github.com/" + project.ext['githubuser'] +
"/" + project.ext['githubrepo'] + "/tree/master"
}
}
// Used for bintray
publishing {
publications {
MyPublication(MavenPublication) {
from components.java
project.configurations.archives.allArtifacts.findAll({
it.classifier in (["sources", "javadoc"] as Set)
}).each({
artifact it
})
groupId project.group
artifactId project.ext['artifactId']
version project.version
pom.withXml {
def root = asNode()
root.appendNode('description', project.ext['description'])
root.appendNode('name', project.group + '.' + project.ext['artifactId'])
root.appendNode('url', project.ext['websiteUrl'])
root.children().last() + pomConfig
}
}
}
}
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publications = ['MyPublication']
publish = true
override = true
pkg {
repo = 'maven'
name = project.ext['artifactId']
userOrg = System.getenv('BINTRAY_USER')
desc = project.ext['description']
licenses = ["MIT"]
issueTrackerUrl = 'https://github.com/wtanaka/docopt.kt/issues'
vcsUrl = 'https://github.com/wtanaka/docopt.kt.git'
websiteUrl = project.ext['websiteUrl']
publicDownloadNumbers = true
version {
name = project.version
released = new Date()
gpg {
sign = true
// passphrase = ''
}
}
}
}