-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish.gradle
81 lines (75 loc) · 2.14 KB
/
publish.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
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
bintray {
user = project.hasProperty("bintrayUser")? project.property("bintrayUser") : ""
key = project.hasProperty("bintrayKey")? project.property("bintrayKey") : ""
configurations = ['archives']
// [Default: false] Whether version should be auto published after an upload
publish = true
pkg {
repo = 'tools'
name = 'smoke'
userOrg = 'ez'
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/bintray/gradle-bintray-plugin.git'
version {
name = project.version
desc = 'Gradle Bintray Plugin 1.0 final'
vcsTag = '1.3.0'
gpg {
// Determines whether to GPG sign the files. The default is false
sign = true
}
}
}
publications = ['MyPublication']
}
// Create the pom configuration:
def pomConfig = {
licenses {
license {
name "The Apache Software License, Version 2.0"
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution "repo"
}
}
developers {
developer {
id "0"
name "Elton Zhong"
email "[email protected]"
}
}
scm {
url "https://github.com/eltonzhong/smoke"
}
}
publishing {
publications {
MyPublication(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
groupId GROUP_ID
artifactId ARTIFACT_ID
version VERSION
pom.withXml {
def root = asNode()
root.appendNode('description', 'Validation framework')
root.appendNode('name', 'smoke')
root.appendNode('url', 'https://github.com/eltonzhong/smoke')
root.children().last() + pomConfig
}
}
}
}