forked from Vonage/vonage-java-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
182 lines (161 loc) · 5.1 KB
/
build.gradle
File metadata and controls
182 lines (161 loc) · 5.1 KB
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.4'
}
}
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'java'
apply plugin: "jacoco"
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'eclipse'
// apply plugin: 'war'
group = "com.nexmo"
archivesBaseName = "client"
version = "5.2.1"
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
repositories {
mavenCentral()
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked"
}
dependencies {
compile 'commons-codec:commons-codec:1.9'
compile 'commons-logging:commons-logging:1.2'
compile 'org.apache.httpcomponents:httpclient:4.5.8'
compile 'commons-io:commons-io:2.5'
compile 'org.apache.commons:commons-lang3:3.5'
compileOnly 'javax.servlet:javax.servlet-api:3.1.0'
compile 'com.fasterxml.jackson.core:jackson-databind:2.9.9'
compile 'io.openapitools.jackson.dataformat:jackson-dataformat-hal:1.0.4'
compile 'javax.xml.bind:jaxb-api:2.3.0'
compile "com.nexmo:jwt:1.0.1"
testCompile "javax.servlet:javax.servlet-api:3.1.0"
testCompile 'junit:junit:4.4'
testCompile "org.mockito:mockito-core:2.25.1"
testCompile 'org.hamcrest:hamcrest-all:1.3'
}
test {
testLogging {
events "failed"
exceptionFormat "full"
}
}
javadoc {
/* info for JavaDoc options http://docs.oracle.com/javase/6/docs/technotes/tools/windows/javadoc.html#overviewcomment */
title "Nexmo Java SDK"
// uncomment this to use a custom javadoc overview
//options.overview = file("src/main/javadoc/overview.html")
// uncomment this to use the custom javadoc styles
//options.stylesheetFile = file("src/main/javadoc/css/styles.css")
//exclude "..."
options.linkSource = true
}
jar {
manifest {
attributes(
"Created-By": 'Nexmo',
'Implementation-Vendor': 'Nexmo',
'Implementation-Title': 'Nexmo Java SDK',
'Implementation-Version': version
)
}
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc
}
assemble.dependsOn javadocJar
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
jacoco {
toolVersion = "0.8.2"
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
check.dependsOn jacocoTestReport
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment {
MavenDeployment deployment -> signing.signPom(deployment)
}
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(
userName: project.properties["maven.username"] ?: "",
password: project.properties["maven.password"] ?: ""
)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(
userName: project.properties["maven.username"] ?: "",
password: project.properties["maven.password"] ?: ""
)
}
pom.project {
name 'Nexmo Java Client Library'
packaging 'jar'
artifactId 'client'
description 'Java client for Nexmo APIs'
url 'https://github.com/Nexmo/nexmo-java/'
scm {
connection 'scm:git:git@github.com:Nexmo/nexmo-java'
developerConnection 'scm:git:git@github.com:Nexmo/nexmo-java'
url 'http://github.com/Nexmo/nexmo-java'
}
licenses {
license {
name 'MIT'
url 'https://raw.github.com/Nexmo/nexmo-java/master/LICENCE.txt'
}
}
organization {
name 'Nexmo'
url 'https://docs.nexmo.com/tools/developer-api'
}
issueManagement {
system 'GitHub'
url 'https://github.com/Nexmo/nexmo-java/issues'
}
developers {
developer {
id 'devrel'
name 'Nexmo Developer Relations Team'
email 'devrel@nexmo.com'
}
}
}
}
}
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
required { gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}
task wrapper(type: Wrapper) {
gradleVersion = '3.1'
}
task zip(type: Zip) {
from configurations.runtime.allArtifacts.files
from configurations.runtime
into(project.name + '-' + project.version)
}
task depJar(type: Jar, dependsOn: configurations.runtime) {
baseName = archivesBaseName + '-with-dependencies'
from { configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}