-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbintray.gradle
77 lines (65 loc) · 2.21 KB
/
bintray.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
/*
* Gradle Bintray Plugin
* https://github.com/bintray/gradle-bintray-plugin
* */
apply plugin: 'com.jfrog.bintray'
apply plugin: 'org.jetbrains.dokka-android'
// Read setup
Properties properties = new Properties()
properties.load(project.rootProject.file('bintray.properties').newDataInputStream())
version = properties.getProperty("lib.version")
if (project.hasProperty("android")) { // Android libraries
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
} else { // Java libraries
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
}
dokka {
outputFormat = 'javadoc'
outputDirectory = "$buildDir/javadoc"
}
task javadocJar(type: Jar, dependsOn: dokka) {
classifier = 'javadoc'
from "$buildDir/javadoc"
}
artifacts {
archives javadocJar
archives sourcesJar
}
bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
configurations = ['archives']
publish = true
// [Default: false] Whether to run this as dry-run, without deploying
dryRun = false
pkg {
repo = properties.getProperty("bintray.repo")
name = properties.getProperty("bintray.name")
desc = properties.getProperty("lib.description")
websiteUrl = properties.getProperty("lib.siteUrl")
issueTrackerUrl = properties.getProperty("lib.issueTracker")
vcsUrl = properties.getProperty("lib.vcs")
licenses = properties.get("license.all")
publicDownloadNumbers = true
// Optional Github repository
githubRepo = properties.getProperty("github.repo")
version {
name = properties.getProperty("lib.version")
desc = properties.getProperty("lib.versionDescription")
released = new Date()
vcsTag = properties.getProperty("lib.version")
gpg {
// Determines whether to GPG sign the files. The default is false
sign = true
// The passphrase for GPG signing'
passphrase = properties.getProperty("bintray.gpg.password")
}
}
}
}