Skip to content

Commit e708a4a

Browse files
authored
Merge pull request #218 from opentok/dev
Merge dev into main
2 parents 34d42fa + 242ef4d commit e708a4a

36 files changed

+697
-558
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[bumpversion]
22
commit = True
33
tag = True
4-
current_version = 4.6.0
4+
current_version = 4.7.0
55
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?
66
serialize =
77
{major}.{minor}.{patch}

.github/workflows/build.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,24 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
java: [ 8, 8.0.x, 9.0.x, 11.0.x, 14 ]
14+
java: [8, 11, 17]
1515
os: [ubuntu-latest, macos-latest, windows-latest]
1616

1717
steps:
1818
- name: Checkout the repo
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v3
2020

2121
- name: Setup Java
22-
uses: actions/setup-java@v1
22+
uses: actions/setup-java@v3
2323
with:
24-
java-version: ${{matrix.java}}
24+
java-version: ${{ matrix.java }}
25+
distribution: 'zulu'
2526

2627
- name: Grant execute permission for gradlew
2728
run: chmod +x gradlew
2829

2930
- name: Cache Gradle packages
30-
uses: actions/cache@v2
31+
uses: actions/cache@v3
3132
with:
3233
path: ~/.gradle/caches
3334
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
@@ -37,4 +38,4 @@ jobs:
3738
run: ./gradlew build
3839

3940
- name: Run Codecov
40-
uses: codecov/codecov-action@v1
41+
uses: codecov/codecov-action@v2

.github/workflows/publish.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Publish to Nexus
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout the repo
10+
uses: actions/checkout@v3
11+
with:
12+
ref: ${{ github.event.release.target_commitish }}
13+
- name: Set up Python
14+
uses: actions/setup-python@v3
15+
with:
16+
python-version: 3.8
17+
- name: Install bump2version
18+
run: |
19+
python -m pip install --upgrade pip
20+
git config --global user.email "44278943+NexmoDev@users.noreply.github.com"
21+
git config --global user.name "NexmoDev"
22+
git config --global github.token ${{ secrets.GITHUB_TOKEN }}
23+
pip install bump2version
24+
- name: Bump Version
25+
run: bump2version --new-version ${{ github.event.release.tag_name }} patch &&
26+
git tag ${{ github.event.release.tag_name }} -f &&
27+
git push && git push --tags origin --force
28+
- name: Setup Java
29+
uses: actions/setup-java@v3
30+
with:
31+
java-version: 17
32+
distribution: 'temurin'
33+
- name: Grant execute permission for gradlew
34+
run: chmod +x gradlew
35+
- name: Cache Gradle packages
36+
uses: actions/cache@v3
37+
with:
38+
path: ~/.gradle/caches
39+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
40+
restore-keys: ${{ runner.os }}-gradle
41+
- name: publish with gradle
42+
env:
43+
signingKey: ${{secrets.SIGNING_KEY}}
44+
signingPassword: ${{secrets.SIGNING_PASSWORD}}
45+
OSS_USERNAME: ${{secrets.OSS_USERNAME}}
46+
OSS_PASSWORD: ${{secrets.OSS_PASSWORD}}
47+
run: OSS_USERNAME=$OSS_USERNAME OSS_PASSWORD=$OSS_PASSWORD signingKey=$signingKey signingPassword=$signingPassword gradle publish --info

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2014-2021 Vonage.
3+
Copyright (c) 2014-2022 Vonage.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ Reference documentation is available at
587587
## Requirements
588588

589589
You need an OpenTok API key and API secret, which you can obtain by logging into your
590-
[TokBox account](https://tokbox.com/account).
590+
[Vonage Video API account](https://tokbox.com/account).
591591

592592
The OpenTok Java SDK requires JDK 8 or greater to compile. Runtime requires Java SE 8 or greater.
593593
This project is tested on both OpenJDK and Oracle implementations.

build.gradle

Lines changed: 101 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,44 @@
11
plugins {
2-
id "com.github.hierynomus.license" version "0.11.0"
2+
id 'java-library'
3+
id 'jacoco'
4+
id 'signing'
5+
id 'maven-publish'
6+
id "com.github.hierynomus.license" version "0.16.1"
37
}
48

5-
apply plugin: 'java'
6-
apply plugin: 'maven'
7-
apply plugin: 'signing'
8-
apply plugin: 'idea'
9-
apply plugin: 'eclipse'
10-
apply plugin: 'license'
11-
apply plugin: 'jacoco'
12-
139
group = 'com.tokbox'
1410
archivesBaseName = 'opentok-server-sdk'
15-
version = '4.6.0'
11+
version = '4.7.0'
12+
13+
sourceCompatibility = "1.8"
14+
targetCompatibility = "1.8"
15+
16+
repositories {
17+
mavenCentral()
18+
}
19+
20+
dependencies {
21+
testImplementation 'junit:junit:4.13.2'
22+
testImplementation 'com.github.tomakehurst:wiremock:1.58'
23+
implementation 'commons-lang:commons-lang:2.6'
24+
implementation 'commons-validator:commons-validator:1.7'
25+
implementation 'org.asynchttpclient:async-http-client:2.12.3'
26+
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.2.2'
27+
implementation 'commons-codec:commons-codec:1.15'
28+
implementation 'org.bitbucket.b_c:jose4j:0.7.11'
29+
}
30+
31+
task sourcesJar(type: Jar) {
32+
archiveClassifier.set("sources")
33+
from sourceSets.main.allSource
34+
}
35+
36+
tasks.withType(JavaCompile) {
37+
options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked"
38+
}
1639

1740
task javadocJar(type: Jar) {
18-
classifier = 'javadoc'
41+
archiveClassifier.set("javadoc")
1942
from javadoc
2043
}
2144
javadoc {
@@ -28,35 +51,16 @@ javadoc {
2851
}
2952
}
3053

54+
jacoco {
55+
toolVersion = "0.8.8"
56+
}
3157
jacocoTestReport {
3258
reports {
33-
xml.enabled true
34-
html.enabled false
59+
xml.getRequired().set(true)
60+
html.getRequired().set(true)
3561
}
3662
}
37-
38-
task sourcesJar(type: Jar) {
39-
classifier = 'sources'
40-
from sourceSets.main.allSource
41-
}
42-
43-
repositories {
44-
mavenCentral()
45-
}
46-
47-
dependencies {
48-
testCompile group: 'junit', name: 'junit', version: '[4.3,5.0]'
49-
testCompile group: 'com.github.tomakehurst', name: 'wiremock', version: '[1.45,2.0]'
50-
compile group: 'commons-lang', name: 'commons-lang', version: '[2.6,3.0]'
51-
compile group: 'org.asynchttpclient', name: 'async-http-client', version: '[2.0,2.99999)'
52-
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '[2.3.1,2.99999)'
53-
compile group: 'commons-validator', name: 'commons-validator', version: '[1.4.0,1.99999)'
54-
compile group: 'commons-codec', name: 'commons-codec', version: '[1.9,1.99999]'
55-
compile group: 'org.bitbucket.b_c', name: 'jose4j', version: '[0.7,1.0)'
56-
// TODO: find out how to initialize these dependencies properly, or remove them
57-
//compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.5'
58-
//compile group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.5'
59-
}
63+
check.dependsOn jacocoTestReport
6064

6165
license {
6266
header rootProject.file('codequality/HEADER')
@@ -68,77 +72,83 @@ artifacts {
6872
}
6973

7074
ext.isReleaseVersion = hasProperty('isReleaseVersion') ? isReleaseVersion : false
71-
signing {
72-
required { isReleaseVersion && gradle.taskGraph.hasTask("uploadArchives") }
73-
sign configurations.archives
74-
}
75-
7675
ext.ossrhUsername = hasProperty('ossrhUsername') ? ossrhUsername : 'dummyuser'
7776
ext.ossrhPassword = hasProperty('ossrhPassword') ? ossrhPassword : 'dummypass'
78-
uploadArchives {
79-
repositories {
80-
mavenDeployer {
81-
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
82-
83-
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2") {
84-
authentication(userName: ossrhUsername, password: ossrhPassword)
85-
}
86-
87-
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
88-
authentication(userName: ossrhUsername, password: ossrhPassword)
89-
}
90-
91-
pom.project {
92-
name 'OpenTok Java SDK'
93-
packaging 'jar'
94-
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.'
95-
url 'http://www.tokbox.com/opentok'
96-
97-
scm {
98-
connection 'scm:git:https://github.com/opentok/Opentok-Java-SDK.git'
99-
developerConnection 'scm:git:https://github.com/opentok/Opentok-Java-SDK.git'
100-
url 'opentok.github.io/opentok-java-sdk'
101-
}
10277

78+
publishing {
79+
publications {
80+
mavenJava(MavenPublication) {
81+
from components.java
82+
pom {
83+
name = "OpenTok Java SDK"
84+
artifactId = 'opentok-server-sdk'
85+
packaging = 'jar'
86+
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."
87+
url = "https://github.com/opentok/opentok-java-sdk"
10388
licenses {
10489
license {
105-
name 'MIT License'
106-
url 'http://www.opensource.org/licenses/mit-license'
90+
name = 'MIT License'
91+
url = "https://raw.github.com/opentok/opentok-java-sdk/main/LICENCE.txt"
10792
}
10893
}
109-
11094
developers {
11195
developer {
112-
id 'manasdpradhan'
113-
name 'Manas Pradhan'
114-
email 'manas@tokbox.com'
115-
organization 'Vonage.'
96+
id = "devrel"
97+
name = "Vonage Devrel"
98+
email = "devrel@vonage.com"
99+
}
100+
developer {
101+
id = 'manasdpradhan'
102+
name = 'Manas Pradhan'
103+
email = 'manas@tokbox.com'
104+
organization = 'Vonage'
105+
}
106+
developer {
107+
id = 'aoberoi'
108+
name = 'Ankur Oberoi'
109+
email = 'aoberoi@gmail.com'
110+
organization = 'Vonage'
116111
}
117112
developer {
118-
id 'aoberoi'
119-
name 'Ankur Oberoi'
120-
email 'aoberoi@gmail.com'
121-
organization 'Vonage.'
113+
id = 'slorello89'
114+
name = 'Steve Lorello'
115+
email = 'steve.lorello@vonage.com'
116+
organization = 'Vonage'
122117
}
118+
developer {
119+
id = 'SMadani'
120+
name = 'Sina Madani'
121+
email = 'sina.madani@vonage.com'
122+
organization = 'Vonage'
123+
}
124+
}
125+
scm {
126+
connection = "scm:git@github.com/opentok/opentok-java-sdk"
127+
developerConnection = "scm:git@github.com/opentok/opentok-java-sdk"
128+
url = "http://github.com/opentok/opentok-java-sdk"
129+
}
130+
131+
issueManagement {
132+
system = "GitHub"
133+
url = "https://http://github.com/opentok/opentok-java-sdk"
123134
}
124135
}
125136
}
126137
}
127-
}
128-
129-
test {
130-
maxHeapSize = "1024m"
131-
}
132-
133-
sourceCompatibility = 1.8
134-
// credit: http://stackoverflow.com/a/22681854/305340
135-
tasks.withType(JavaCompile) {
136-
options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked"
137-
doFirst {
138-
if (System.env.JDK8_HOME != null) {
139-
options.bootClasspath = "$System.env.JDK8_HOME/jre/lib/rt.jar"
140-
options.bootClasspath += "$File.pathSeparator$System.env.JDK8_HOME/jre/lib/jce.jar"
141-
// and other specific JDK jars
138+
repositories {
139+
maven {
140+
def releasesRepoUrl = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
141+
def snapshotsRepoUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/")
142+
credentials.username(System.getenv("OSS_USERNAME"))
143+
credentials.password(System.getenv("OSS_PASSWORD"))
144+
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
142145
}
143146
}
144147
}
148+
149+
signing {
150+
def signingKey = System.getenv("signingKey")
151+
def signingPassword = System.getenv("signingPassword")
152+
useInMemoryPgpKeys(signingKey, signingPassword)
153+
sign publishing.publications.mavenJava
154+
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
#Mon Apr 05 14:22:26 EDT 2021
2+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
13
distributionBase=GRADLE_USER_HOME
24
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
4-
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6+
zipStoreBase=GRADLE_USER_HOME

sample/Archiving/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ repositories {
66
}
77

88
dependencies {
9-
compile project(':')
10-
compile group: 'com.github.codingricky', name: 'spark-core-16', version: '1.1'
11-
compile group: 'org.freemarker', name: 'freemarker', version: '2.3.19'
12-
compile group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.6'
9+
implementation project(':')
10+
implementation 'com.github.codingricky:spark-core-16:1.1'
11+
implementation 'org.freemarker:freemarker:2.3.19'
12+
implementation 'org.slf4j:slf4j-simple:1.7.6'
1313
}
1414

1515
run.systemProperty 'API_KEY', ''

0 commit comments

Comments
 (0)