forked from linkedin/LiTr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublish.gradle
93 lines (78 loc) · 2.72 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
82
83
84
85
86
87
88
89
90
91
92
93
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
ext {
githubUrl = 'https://github.com/linkedin/LiTr'
gitUrl = 'git@github.com:linkedin/LiTr.git'
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
publishing {
publications {
aar(MavenPublication) {
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar") {
builtBy assemble
}
artifact sourcesJar
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
description = project.description
url githubUrl
scm {
url githubUrl
connection gitUrl
developerConnection gitUrl
}
licenses {
license {
name '2-Clause BSD License'
url 'https://opensource.org/licenses/BSD-2-Clause'
distribution 'repo'
}
}
developers {
developer {
id 'com.linkedin'
name 'LinkedIn Corp.'
email ''
}
}
dependencies {
configurations.implementation.allDependencies.each { ModuleDependency dp ->
dependency {
resolveStrategy = Closure.DELEGATE_ONLY
groupId dp.group
artifactId dp.name
version dp.version
}
}
}
}
}
}
}
}
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
pkg {
userOrg = 'linkedin'
repo = 'maven'
name = project.name
desc = project.description
labels = ['android','video','audio','media','transcoder']
licenses = ['2-Clause BSD License']
websiteUrl = githubUrl
vcsUrl = gitUrl
issueTrackerUrl = 'https://github.com/linkedin/LiTr/issues'
githubRepo = 'linkedin/LiTr'
version {
name = project.ext.releaseVersion
released = new Date()
}
publish = true
}
publications = ['aar']
}