-
Notifications
You must be signed in to change notification settings - Fork 115
/
upload_bintray.gradle
54 lines (48 loc) · 1.3 KB
/
upload_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
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
group = groupId
artifactId = artifactId
version = versionCode
def getPropertyFromLocalProperties(key) {
File file = project.rootProject.file('local.properties')
if (file.exists()) {
Properties properties = new Properties()
properties.load(file.newDataInputStream())
return properties.getProperty(key)
}
}
def siteUrl = 'https://tech.meituan.com/shield-opensource.html'
def gitUrl = 'https://github.com/Meituan-Dianping/Shield.git'
bintray {
user = getPropertyFromLocalProperties("bintray.user")
key = getPropertyFromLocalProperties("bintray.apikey")
configurations = ['archives']
pkg {
repo = 'maven'
name = "${project.group}:${project.name}"
userOrg = 'meituan'
licenses = ['MIT']
websiteUrl = siteUrl
vcsUrl = gitUrl
publish = true
}
}
install {
repositories.mavenInstaller {
pom {
project {
packaging 'aar'
groupId groupId
artifactId artifactId
version versionCode
}
}
}
}
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
artifacts {
archives sourcesJar
}