This repository has been archived by the owner on Dec 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpublish.gradle
108 lines (86 loc) · 3.09 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
ext.lib_name = ''
ext.lib_description = ''
def lib_tag = project.hasProperty('tag') ? project.property('tag') : System.getenv('TRAVIS_TAG')
def repository_url = 'https://github.com/Zellius/RxLocationManager'
def lib_version = '0.0.0'
if (lib_tag?.trim()) {
lib_version = (lib_tag =~ /v(\d+\.\d+\.\d+)/)[0][1]
}
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.github.dcendents.android-maven'
afterEvaluate {
group 'com.github.zellius'
version lib_version
install {
repositories.mavenInstaller {
pom {
project {
packaging 'aar'
name lib_name
description lib_description
url repository_url
licenses {
license {
name 'MIT'
url 'https://raw.github.com/zellius/RxLocationManager/master/LICENSE'
}
}
developers {
developer {
id 'zellius'
name 'Sergey Solodovnikov'
email '[email protected]'
}
}
scm {
url repository_url
connection "scm:${repository_url}.git"
developerConnection "scm:${repository_url}.git"
}
}
}
}
}
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
configurations = ['archives']
pkg {
repo = 'maven'
name = lib_name
desc = lib_description
licenses = ['MIT']
websiteUrl = repository_url
issueTrackerUrl = "$repository_url/issues"
vcsUrl = "${repository_url}.git"
labels = ['android', 'location', 'rxJava', 'locationmanager']
githubRepo = "Zellius/RxLocationManager"
githubReleaseNotesFile = 'README.md'
version {
name = lib_version
vcsTag = "v$lib_version"
released = new Date()
}
}
}
apply plugin: 'org.jetbrains.dokka-android'
dokka {
outputFormat = 'javadoc'
//add lib javadoc and core javadoc
sourceDirs = files("$buildDir/generated/core/release", android.sourceSets.main.java.srcDirs)
outputDirectory = "$buildDir/javadoc"
}
task androidJavadocsJar(type: Jar, dependsOn: dokka) {
classifier 'javadoc'
from dokka.outputDirectory
}
task androidSourcesJar(type: Jar) {
classifier 'sources'
//add lib sources and core sources
from "$buildDir/generated/core/release", android.sourceSets.main.java.srcDirs
}
artifacts {
archives androidSourcesJar
archives androidJavadocsJar
}
}