-
Notifications
You must be signed in to change notification settings - Fork 8
/
deployment.gradle
97 lines (83 loc) · 2.79 KB
/
deployment.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
def packageDesc = 'AIDL tool replacement, implemented as Java annotation processor'
def packageSite = 'https://github.com/chdir/aidl2'
def mainLic = 'GPL-2.0+CE'
def libVcs = 'https://github.com/chdir/aidl2'
def aidl2ver = '0.3.5'
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) {
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
def pomXmlContents = new XmlParser().parseText """
<dependencies>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>13.0</version>
<type>jar</type>
<scope>compile</scope>
<optional>false</optional>
</dependency>
<dependency>
<groupId>net.sf.aidl2</groupId>
<artifactId>api</artifactId>
<version>$aidl2ver</version>
<type>jar</type>
<scope>compile</scope>
<optional>false</optional>
</dependency>
</dependencies>
"""
publishing {
publications {
AIDL2(MavenPublication) {
artifact tasks.applyProguard.outJarFiles[0]
artifact tasks.sourcesJar
artifact tasks.javadocJar
artifact tasks.proguardMapping
groupId 'net.sf.aidl2'
artifactId 'compiler'
version aidl2ver
pom.withXml { provider ->
provider.asNode().append(pomXmlContents)
}
}
AIDL2API(MavenPublication) {
artifact tasks.apiJar
groupId 'net.sf.aidl2'
artifactId 'api'
version aidl2ver
}
}
}
bintray {
user = props['bintrayUser']
key = props['bintrayKey']
publications = ['AIDL2', 'AIDL2API']
pkg {
repo = 'maven'
name = 'aidl2'
desc = packageDesc
websiteUrl = packageSite
issueTrackerUrl = 'https://github.com/Alexander--/aidl2/issues'
vcsUrl = libVcs
licenses = [mainLic]
labels = ['android', 'aidl', 'apt']
publicDownloadNumbers = true
githubRepo = 'chdir/aidl2'
githubReleaseNotesFile = 'README.md'
version {
name = aidl2ver
vcsTag = "v${name}"
}
publish = false
}
}
tasks.bintrayUpload.dependsOn tasks.proguardMapping, tasks.sourcesJar, tasks.javadocJar, tasks.apiJar
}