-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbintray-upload.gradle
64 lines (54 loc) · 1.72 KB
/
bintray-upload.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
apply plugin: 'com.jfrog.bintray'
task generateSourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier 'sources'
}
task generateJavadocs(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
options.addStringOption('Xdoclint:none', '-quiet')
}
afterEvaluate {
generateJavadocs.classpath += files(android.libraryVariants.collect { variant ->
variant.getJavaCompileProvider().configure() {
it.classpath
}
})
generateJavadocs.classpath += files(android.libraryVariants.collect { variant ->
variant.getJavaCompileProvider().configure() {
it.outputs
}
})
}
task generateJavadocsJar(type: Jar, dependsOn: generateJavadocs) {
from generateJavadocs.destinationDir
classifier 'javadoc'
}
artifacts {
archives generateSourcesJar
// archives generateJavadocsJar
}
// For the plugin 'com.jfrog.bintray'
Properties properties = new Properties()
if (rootProject.file('local.properties').exists()) {
properties.load(rootProject.file('local.properties').newDataInputStream())
}
bintray {
user = properties.getProperty('bintray.user')
key = properties.getProperty('bintray.apikey')
configurations = ['archives']
publish = true
pkg {
repo = bintrayMaven.projectRepo
name = project.ext.moduleName
desc = project.ext.moduleDesc
websiteUrl = bintrayMaven.projectUrl
vcsUrl = bintrayMaven.projectScmConnection
licenses = ['Apache-2.0']
publicDownloadNumbers = true
version {
name = bintrayMaven.version
released = new Date()
}
}
}