Skip to content

Commit ed5cbc4

Browse files
authored
Bump dependency versions (#233)
Improved release process, bumped dependency versions (including WireMock), slightly improved test coverage, updated copyright year, merged main, ready for release v4.8.1.
1 parent d386de2 commit ed5cbc4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1062
-1088
lines changed

.bumpversion.cfg

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
[bumpversion]
22
commit = True
3-
tag = True
4-
current_version = v4.8.0
5-
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?
3+
tag = False
4+
current_version = v4.8.1
5+
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
66
serialize =
7+
{major}.{minor}.{patch}-{release}{build}
78
{major}.{minor}.{patch}
89

910
[bumpversion:file:build.gradle]
1011

12+
[bumpversion:file:README.md]
13+
1114
[bumpversion:file:src/main/java/com/opentok/constants/Version.java]

.github/workflows/publish.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,6 @@ jobs:
1010
uses: actions/checkout@v3
1111
with:
1212
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
2813
- name: Setup Java
2914
uses: actions/setup-java@v3
3015
with:
@@ -44,4 +29,7 @@ jobs:
4429
signingPassword: ${{secrets.SIGNING_PASSWORD}}
4530
OSS_USERNAME: ${{secrets.OSS_USERNAME}}
4631
OSS_PASSWORD: ${{secrets.OSS_PASSWORD}}
47-
run: OSS_USERNAME=$OSS_USERNAME OSS_PASSWORD=$OSS_PASSWORD signingKey=$signingKey signingPassword=$signingPassword gradle publish --info
32+
run: |
33+
OSS_USERNAME=$OSS_USERNAME OSS_PASSWORD=$OSS_PASSWORD
34+
signingKey=$signingKey signingPassword=$signingPassword
35+
gradle publishToSonatype closeAndReleaseSonatypeStagingRepository --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-2022 Vonage.
3+
Copyright (c) 2014-2023 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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ When you use Maven as your build tool, you can manage dependencies in the `pom.x
3333
<dependency>
3434
<groupId>com.tokbox</groupId>
3535
<artifactId>opentok-server-sdk</artifactId>
36-
<version>[4.4.1,5.0)</version>
36+
<version>4.8.1</version>
3737
</dependency>
3838
```
3939

@@ -43,7 +43,7 @@ When you use Gradle as your build tool, you can manage dependencies in the `buil
4343

4444
```groovy
4545
dependencies {
46-
compile group: 'com.tokbox', name: 'opentok-server-sdk', version: '[4.4.1,5.0)'
46+
compile group: 'com.tokbox', name: 'opentok-server-sdk', version: '4.8.1'
4747
}
4848
```
4949

@@ -52,7 +52,7 @@ dependencies {
5252
Download the jar file for the latest release from the
5353
[Releases](https://github.com/opentok/opentok-java-sdk/releases) page. Include it in the classpath
5454
for your own project by
55-
[using the JDK directly](http://docs.oracle.com/javase/7/docs/technotes/tools/windows/classpath.html)
55+
[using the JDK directly](http://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html)
5656
or in your IDE of choice.
5757

5858
## Usage

build.gradle

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,31 @@ plugins {
55
id 'jacoco'
66
id 'signing'
77
id 'maven-publish'
8+
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
89
id "com.github.hierynomus.license" version "0.16.1"
910
}
1011

1112
group = 'com.tokbox'
1213
archivesBaseName = 'opentok-server-sdk'
13-
version = '4.8.0'
14-
14+
version = '4.8.1'
1515
sourceCompatibility = "1.8"
1616
targetCompatibility = "1.8"
1717

18+
ext.githubPath = 'opentok/opentok-java-sdk'
19+
1820
repositories {
1921
mavenCentral()
2022
}
2123

2224
dependencies {
2325
testImplementation 'junit:junit:4.13.2'
24-
testImplementation 'com.github.tomakehurst:wiremock:1.58'
26+
testImplementation 'com.github.tomakehurst:wiremock-jre8:2.35.0'
2527
implementation 'commons-lang:commons-lang:2.6'
2628
implementation 'commons-validator:commons-validator:1.7'
2729
implementation 'org.asynchttpclient:async-http-client:2.12.3'
28-
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.4'
30+
implementation 'com.fasterxml.jackson.core:jackson-databind:2.14.1'
2931
implementation 'commons-codec:commons-codec:1.15'
30-
implementation 'org.bitbucket.b_c:jose4j:0.8.0'
32+
implementation 'org.bitbucket.b_c:jose4j:0.9.2'
3133
}
3234

3335
task sourcesJar(type: Jar) {
@@ -87,11 +89,11 @@ publishing {
8789
artifactId = 'opentok-server-sdk'
8890
packaging = 'jar'
8991
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."
90-
url = "https://github.com/opentok/opentok-java-sdk"
92+
url = "https://github.com/$githubPath"
9193
licenses {
9294
license {
9395
name = 'MIT License'
94-
url = "https://raw.github.com/opentok/opentok-java-sdk/main/LICENCE.txt"
96+
url = "https://raw.github.com/$githubPath/main/LICENCE.txt"
9597
}
9698
}
9799
developers {
@@ -126,25 +128,25 @@ publishing {
126128
}
127129
}
128130
scm {
129-
connection = "scm:git@github.com/opentok/opentok-java-sdk"
130-
developerConnection = "scm:git@github.com/opentok/opentok-java-sdk"
131-
url = "http://github.com/opentok/opentok-java-sdk"
131+
connection = "scm:git@github.com/$githubPath"
132+
developerConnection = "scm:git@github.com/$githubPath"
133+
url = "https://github.com/$githubPath"
132134
}
133135

134136
issueManagement {
135137
system = "GitHub"
136-
url = "https://http://github.com/opentok/opentok-java-sdk"
138+
url = "https://github.com/$githubPath"
137139
}
138140
}
139141
}
140142
}
143+
}
144+
145+
nexusPublishing {
141146
repositories {
142-
maven {
143-
def releasesRepoUrl = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
144-
def snapshotsRepoUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/")
145-
credentials.username(System.getenv("OSS_USERNAME"))
146-
credentials.password(System.getenv("OSS_PASSWORD"))
147-
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
147+
sonatype {
148+
username = System.getenv("OSS_USERNAME")
149+
password = System.getenv("OSS_PASSWORD")
148150
}
149151
}
150152
}

bumpversion.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#
2+
# OpenTok Java SDK
3+
# Copyright (C) 2023 Vonage.
4+
# http://www.tokbox.com
5+
#
6+
# Licensed under The MIT License (MIT). See LICENSE file for more information.
7+
#
8+
if [ "$1" = "" ]
9+
then
10+
echo "Usage: $0 <new version>"
11+
exit 1
12+
fi
13+
14+
python -m pip install --upgrade pip
15+
pip install bump2version
16+
bump2version --new-version "$1" patch

src/main/java/com/opentok/Archive.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2022 Vonage.
3+
* Copyright (C) 2023 Vonage.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/ArchiveLayout.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2022 Vonage.
3+
* Copyright (C) 2023 Vonage.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/ArchiveList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2022 Vonage.
3+
* Copyright (C) 2023 Vonage.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/ArchiveMode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2022 Vonage.
3+
* Copyright (C) 2023 Vonage.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/ArchiveProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2022 Vonage.
3+
* Copyright (C) 2023 Vonage.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/Broadcast.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2022 Vonage.
3+
* Copyright (C) 2023 Vonage.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/BroadcastLayout.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2022 Vonage.
3+
* Copyright (C) 2023 Vonage.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/BroadcastProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2022 Vonage.
3+
* Copyright (C) 2023 Vonage.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/CreatedSession.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2022 Vonage.
3+
* Copyright (C) 2023 Vonage.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/Hls.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2022 Vonage.
3+
* Copyright (C) 2023 Vonage.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/MediaMode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2022 Vonage.
3+
* Copyright (C) 2023 Vonage.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/MuteAllProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2022 Vonage.
3+
* Copyright (C) 2023 Vonage.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/OpenTok.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2022 Vonage.
3+
* Copyright (C) 2023 Vonage.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.
77
*/
88
package com.opentok;
9+
910
import com.fasterxml.jackson.core.JsonProcessingException;
1011
import com.fasterxml.jackson.databind.JsonNode;
1112
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -37,9 +38,10 @@
3738
*/
3839
public class OpenTok {
3940

40-
private int apiKey;
41-
private String apiSecret;
41+
private final int apiKey;
42+
private final String apiSecret;
4243
protected HttpClient client;
44+
4345
protected static final ObjectReader
4446
archiveReader = new ObjectMapper().readerFor(Archive.class),
4547
archiveListReader = new ObjectMapper().readerFor(ArchiveList.class),

src/main/java/com/opentok/Render.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2022 Vonage.
3+
* Copyright (C) 2023 Vonage.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/RenderProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2022 Vonage.
3+
* Copyright (C) 2023 Vonage.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/RenderStatus.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2022 Vonage.
3+
* Copyright (C) 2023 Vonage.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/Role.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2022 Vonage.
3+
* Copyright (C) 2023 Vonage.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/Rtmp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2022 Vonage.
3+
* Copyright (C) 2023 Vonage.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/RtmpProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2022 Vonage.
3+
* Copyright (C) 2023 Vonage.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/ScreenShareLayoutType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2022 Vonage.
3+
* Copyright (C) 2023 Vonage.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/Session.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2022 Vonage.
3+
* Copyright (C) 2023 Vonage.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/SessionProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2022 Vonage.
3+
* Copyright (C) 2023 Vonage.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

src/main/java/com/opentok/SignalProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* OpenTok Java SDK
3-
* Copyright (C) 2022 Vonage.
3+
* Copyright (C) 2023 Vonage.
44
* http://www.tokbox.com
55
*
66
* Licensed under The MIT License (MIT). See LICENSE file for more information.

0 commit comments

Comments
 (0)