-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublish.gradle
38 lines (35 loc) · 1.05 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
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
afterEvaluate { project ->
if (project.getPlugins().hasPlugin('com.android.library')) {
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
} else {
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
}
artifacts {
archives sourcesJar
}
bintray {
user = project.hasProperty('BINTRAY_USER') ? BINTRAY_USER : ""
key = project.hasProperty('BINTRAY_API_KEY') ? BINTRAY_API_KEY : ""
configurations = ['archives']
publish = true
pkg {
repo = ARTIFACT_REPO
name = ARTIFACT_NAME
userOrg = user
licenses = ['Apache-2.0']
vcsUrl = ARTIFACT_VCS_URL
version {
name = ARTIFACT_VERSION
desc = ARTIFACT_DESCRIPTION
}
}
}
}