-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeployment-provider.gradle
94 lines (81 loc) · 2.66 KB
/
deployment-provider.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
def packageDesc = 'A ContentProvider & DocumentProvider for accessing files, available to superuser'
def packageSite = 'https://github.com/chdir/fdutil'
def mainLic = 'GPL-3.0'
def libVcs = 'https://github.com/chdir/fdutil'
def providersVer = '1.6'
def props = new Properties()
def propFile
def propName = project.properties.deploymentConfig
if(propName && (propFile = file(propName)).exists()) {
new FileInputStream(propFile).withStream { InputStream is ->
props.load(is)
}
}
if (props) {
task androidSourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
def pomXmlContents = new XmlParser().parseText """
<dependencies>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>support-compat</artifactId>
<version>25.1.0</version>
<type>jar</type>
<scope>compile</scope>
<optional>false</optional>
</dependency>
<dependency>
<groupId>net.sf.xfd</groupId>
<artifactId>syscallserver</artifactId>
<version>1.6</version>
<type>jar</type>
<scope>compile</scope>
<optional>false</optional>
</dependency>
</dependencies>
"""
publishing {
publications {
xfdbase(MavenPublication) {
artifact ([
source: file("$buildDir/outputs/aar/provider-release.aar"),
extension: 'aar',
])
artifact androidSourcesJar
groupId 'net.sf.xfd'
artifactId 'providers'
version providersVer
pom.withXml { provider ->
provider.asNode().append(pomXmlContents)
}
}
}
}
bintray {
user = props['bintrayUser']
key = props['bintrayKey']
publications = ['xfdbase']
pkg {
repo = 'maven'
name = 'super-providers'
desc = packageDesc
websiteUrl = packageSite
issueTrackerUrl = 'https://github.com/chdir/fdutil/issues'
vcsUrl = libVcs
licenses = [mainLic]
labels = ['android']
publicDownloadNumbers = true
githubRepo = 'chdir/fdutil'
version {
name = providersVer
vcsTag = "v${name}"
}
publish = false
}
}
tasks.bintrayUpload.dependsOn tasks.assemble
}