forked from KasperskyLab/Kaspresso
-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish.gradle
60 lines (52 loc) · 1.64 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
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
ext {
ver = '1.0.1'
groupId = 'com.kaspersky.android-components'
artifactId = 'kaspresso'
repo = 'Kaspresso'
repoName = 'Kaspresso'
vcsUrl = 'https://github.com/KasperskyLab/Kaspresso.git'
}
publishing {
publications {
Kaspresso(MavenPublication) {
afterEvaluate {
artifact "$rootDir/kaspresso/build/outputs/aar/kaspresso-release.aar"
artifact sourcesJar
artifact javadocJar
}
groupId this.groupId
artifactId this.artifactId
version this.ver
pom.withXml {
def dependenciesNode = asNode().getAt('dependencies')[0]
?: asNode().appendNode('dependencies')
configurations.implementation.allDependencies.each {
if (it.name != 'unspecified') {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
}
}
bintray {
user = property('bintrayuser')
key = property('bintraykey')
publications = ['Kaspresso']
pkg {
repo = this.repo
name = this.repoName
userOrg = user
licenses = ['Apache-2.0']
vcsUrl = this.vcsUrl
version {
name = this.ver
}
}
}
bintrayUpload.dependsOn assemble