-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
113 lines (98 loc) · 2.92 KB
/
build.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
109
110
111
112
113
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
buildscript {
repositories {
jcenter()
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.4'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'gradle.plugin.de.fuerstenau:BuildConfigPlugin:1.1.8'
}
}
allprojects {
repositories {
jcenter()
}
}
Set<String> publishedLibs = new HashSet<String>()
publishedLibs << 'sms'
publishedLibs << 'payment'
publishedLibs << 'token'
publishedLibs << 'airtime'
publishedLibs << 'voice'
publishedLibs << 'ussd'
publishedLibs << 'account'
publishedLibs << 'core'
publishedLibs << 'server'
configure(subprojects.findAll {publishedLibs.contains(it.name)}){
group properties.getProperty("bintray.groupId")
version properties.getProperty("bintray.version")
apply plugin: 'java'
apply plugin: "maven-publish"
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.github.johnrengelman.shadow'
targetCompatibility = 1.8
sourceCompatibility = 1.8
jar {
manifest {
attributes 'Implementation-Title': 'Africa\'s Talking SDK',
'Implementation-Version': version
}
}
javadoc {
source = sourceSets.main.allJava
classpath = configurations.compile
options {
links "http://docs.oracle.com/javase/7/docs/api/"
}
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
classifier = 'sources'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
shadowJar {
classifier = null // Avoid classifiers for now...
}
artifacts {
archives javadocJar
archives sourcesJar
}
publishing {
publications {
SDK(MavenPublication) {
artifact shadowJar
groupId properties.getProperty("bintray.groupId")
artifactId project.name
version project.version
}
}
}
bintray {
dryRun = false
publish = true
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.key")
publications = ['SDK']
pkg {
repo = properties.getProperty("bintray.repo")
name = properties.getProperty("bintray.package")
userOrg = properties.getProperty("bintray.organization")
vcsUrl = properties.getProperty("bintray.vcsUrl")
licenses = ['MIT']
version {
name = project.version
desc = 'Africa\'s Talking SDK'
released = new Date()
attributes = ['maturity': 'Development']
}
}
}
}