-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy pathbuild.gradle
183 lines (162 loc) · 5.16 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
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
183
import java.time.LocalDate
plugins {
id 'java-library'
id 'jacoco'
id 'signing'
id 'maven-publish'
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
id 'com.github.hierynomus.license' version '0.16.1'
id 'com.github.ben-manes.versions' version '0.51.0'
}
group = 'com.tokbox'
archivesBaseName = 'opentok-server-sdk'
version = '4.15.1'
ext.githubPath = "opentok/Opentok-Java-SDK"
repositories {
mavenCentral()
}
dependencies {
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.wiremock:wiremock:3.10.0'
testImplementation 'com.google.guava:guava:33.4.0-jre'
testImplementation 'io.jsonwebtoken:jjwt-api:0.12.6'
testImplementation 'io.jsonwebtoken:jjwt-impl:0.12.6'
testImplementation 'io.jsonwebtoken:jjwt-jackson:0.12.6'
implementation 'com.vonage:jwt:2.0.0'
implementation 'commons-lang:commons-lang:2.6'
implementation 'commons-codec:commons-codec:1.17.1'
implementation 'io.netty:netty-codec-http:4.1.116.Final'
implementation 'io.netty:netty-handler:4.1.116.Final'
implementation 'org.asynchttpclient:async-http-client:2.12.4'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.18.2'
implementation 'org.bitbucket.b_c:jose4j:0.9.6'
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = sourceCompatibility
}
compileTestJava {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = sourceCompatibility
}
task sourcesJar(type: Jar) {
archiveClassifier.set("sources")
from sourceSets.main.allSource
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked"
}
task javadocJar(type: Jar) {
archiveClassifier.set("javadoc")
from javadoc
}
javadoc {
title = 'OpenTok Java SDK Reference'
destinationDir = file('docs')
exclude '**/util/**', '**/constants/**'
options {
locale 'en_US'
setMemberLevel JavadocMemberLevel.PUBLIC
addBooleanOption('Xdoclint:none', true)
}
}
jacoco {
toolVersion = "0.8.12"
}
jacocoTestReport {
reports {
xml.getRequired().set(true)
html.getRequired().set(true)
}
}
check.dependsOn jacocoTestReport
license {
header rootProject.file('codequality/HEADER')
ext.year = LocalDate.now().getYear()
}
artifacts {
archives javadocJar, sourcesJar
}
java {
withSourcesJar()
withJavadocJar()
}
test {
testLogging {
exceptionFormat = 'full'
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = "OpenTok Java SDK"
artifactId = 'opentok-server-sdk'
packaging = 'jar'
description = "The OpenTok Java SDK lets you generate sessions and tokens for OpenTok applications. This version of the SDK also includes support for working with OpenTok 2.0 archives."
url = "https://github.com/$githubPath"
licenses {
license {
name = 'MIT License'
url = "https://raw.github.com/$githubPath/refs/heads/main/LICENSE"
}
}
developers {
developer {
id = "devrel"
name = "Vonage Devrel"
email = "[email protected]"
}
developer {
id = 'manasdpradhan'
name = 'Manas Pradhan'
email = '[email protected]'
organization = 'Vonage'
}
developer {
id = 'aoberoi'
name = 'Ankur Oberoi'
email = '[email protected]'
organization = 'Vonage'
}
developer {
id = 'slorello89'
name = 'Steve Lorello'
email = '[email protected]'
organization = 'Vonage'
}
developer {
id = 'smadani'
name = 'Sina Madani'
email = '[email protected]'
organization = 'Vonage'
}
}
scm {
connection = "scm:[email protected]/$githubPath"
developerConnection = "scm:[email protected]/$githubPath"
url = "https://github.com/$githubPath"
}
issueManagement {
system = "GitHub"
url = "https://github.com/$githubPath"
}
}
}
}
}
nexusPublishing {
repositories {
sonatype {
username = System.getenv("OSS_USERNAME")
password = System.getenv("OSS_PASSWORD")
}
}
}
signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}