-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathbuild.gradle
83 lines (72 loc) · 1.88 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
buildscript {
repositories {
mavenCentral()
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:5.2.0'
}
}
Set<String> publishedLibs = new HashSet<String>()
publishedLibs << 'sms'
publishedLibs << 'chat'
publishedLibs << 'mobileData'
publishedLibs << 'token'
publishedLibs << 'airtime'
publishedLibs << 'voice'
publishedLibs << 'insights'
publishedLibs << 'ussd'
publishedLibs << 'application'
publishedLibs << 'core'
configure(subprojects.findAll {publishedLibs.contains(it.name)}){
group 'com.github.AfricasTalkingLtd'
version '3.5.0'
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'com.github.johnrengelman.shadow'
targetCompatibility = 1.8
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
jar {
manifest {
attributes 'Implementation-Title': 'Africa\'s Talking SDK',
'Implementation-Version': version
}
}
javadoc {
source = sourceSets.main.allJava
// classpath = configurations.implementation
options {
links "http://docs.oracle.com/javase/8/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 project.group
artifactId project.name
version project.version
}
}
}
}