Skip to content

Commit

Permalink
Bump dependency versions (#233)
Browse files Browse the repository at this point in the history
Improved release process, bumped dependency versions (including WireMock), slightly improved test coverage, updated copyright year, merged main, ready for release v4.8.1.
  • Loading branch information
SMadani authored Jan 15, 2023
1 parent d386de2 commit ed5cbc4
Show file tree
Hide file tree
Showing 49 changed files with 1,062 additions and 1,088 deletions.
9 changes: 6 additions & 3 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
[bumpversion]
commit = True
tag = True
current_version = v4.8.0
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?
tag = False
current_version = v4.8.1
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
serialize =
{major}.{minor}.{patch}-{release}{build}
{major}.{minor}.{patch}

[bumpversion:file:build.gradle]

[bumpversion:file:README.md]

[bumpversion:file:src/main/java/com/opentok/constants/Version.java]
20 changes: 4 additions & 16 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,6 @@ jobs:
uses: actions/checkout@v3
with:
ref: ${{ github.event.release.target_commitish }}
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Install bump2version
run: |
python -m pip install --upgrade pip
git config --global user.email "[email protected]"
git config --global user.name "NexmoDev"
git config --global github.token ${{ secrets.GITHUB_TOKEN }}
pip install bump2version
- name: Bump Version
run: bump2version --new-version ${{ github.event.release.tag_name }} patch &&
git tag ${{ github.event.release.tag_name }} -f &&
git push && git push --tags origin --force
- name: Setup Java
uses: actions/setup-java@v3
with:
Expand All @@ -44,4 +29,7 @@ jobs:
signingPassword: ${{secrets.SIGNING_PASSWORD}}
OSS_USERNAME: ${{secrets.OSS_USERNAME}}
OSS_PASSWORD: ${{secrets.OSS_PASSWORD}}
run: OSS_USERNAME=$OSS_USERNAME OSS_PASSWORD=$OSS_PASSWORD signingKey=$signingKey signingPassword=$signingPassword gradle publish --info
run: |
OSS_USERNAME=$OSS_USERNAME OSS_PASSWORD=$OSS_PASSWORD
signingKey=$signingKey signingPassword=$signingPassword
gradle publishToSonatype closeAndReleaseSonatypeStagingRepository --info
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014-2022 Vonage.
Copyright (c) 2014-2023 Vonage.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ When you use Maven as your build tool, you can manage dependencies in the `pom.x
<dependency>
<groupId>com.tokbox</groupId>
<artifactId>opentok-server-sdk</artifactId>
<version>[4.4.1,5.0)</version>
<version>4.8.1</version>
</dependency>
```

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

```groovy
dependencies {
compile group: 'com.tokbox', name: 'opentok-server-sdk', version: '[4.4.1,5.0)'
compile group: 'com.tokbox', name: 'opentok-server-sdk', version: '4.8.1'
}
```

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

## Usage
Expand Down
36 changes: 19 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,31 @@ plugins {
id 'jacoco'
id 'signing'
id 'maven-publish'
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
id "com.github.hierynomus.license" version "0.16.1"
}

group = 'com.tokbox'
archivesBaseName = 'opentok-server-sdk'
version = '4.8.0'

version = '4.8.1'
sourceCompatibility = "1.8"
targetCompatibility = "1.8"

ext.githubPath = 'opentok/opentok-java-sdk'

repositories {
mavenCentral()
}

dependencies {
testImplementation 'junit:junit:4.13.2'
testImplementation 'com.github.tomakehurst:wiremock:1.58'
testImplementation 'com.github.tomakehurst:wiremock-jre8:2.35.0'
implementation 'commons-lang:commons-lang:2.6'
implementation 'commons-validator:commons-validator:1.7'
implementation 'org.asynchttpclient:async-http-client:2.12.3'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.4'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.14.1'
implementation 'commons-codec:commons-codec:1.15'
implementation 'org.bitbucket.b_c:jose4j:0.8.0'
implementation 'org.bitbucket.b_c:jose4j:0.9.2'
}

task sourcesJar(type: Jar) {
Expand Down Expand Up @@ -87,11 +89,11 @@ publishing {
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/opentok/opentok-java-sdk"
url = "https://github.com/$githubPath"
licenses {
license {
name = 'MIT License'
url = "https://raw.github.com/opentok/opentok-java-sdk/main/LICENCE.txt"
url = "https://raw.github.com/$githubPath/main/LICENCE.txt"
}
}
developers {
Expand Down Expand Up @@ -126,25 +128,25 @@ publishing {
}
}
scm {
connection = "scm:[email protected]/opentok/opentok-java-sdk"
developerConnection = "scm:[email protected]/opentok/opentok-java-sdk"
url = "http://github.com/opentok/opentok-java-sdk"
connection = "scm:[email protected]/$githubPath"
developerConnection = "scm:[email protected]/$githubPath"
url = "https://github.com/$githubPath"
}

issueManagement {
system = "GitHub"
url = "https://http://github.com/opentok/opentok-java-sdk"
url = "https://github.com/$githubPath"
}
}
}
}
}

nexusPublishing {
repositories {
maven {
def releasesRepoUrl = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
def snapshotsRepoUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/")
credentials.username(System.getenv("OSS_USERNAME"))
credentials.password(System.getenv("OSS_PASSWORD"))
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
sonatype {
username = System.getenv("OSS_USERNAME")
password = System.getenv("OSS_PASSWORD")
}
}
}
Expand Down
16 changes: 16 additions & 0 deletions bumpversion.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# OpenTok Java SDK
# Copyright (C) 2023 Vonage.
# http://www.tokbox.com
#
# Licensed under The MIT License (MIT). See LICENSE file for more information.
#
if [ "$1" = "" ]
then
echo "Usage: $0 <new version>"
exit 1
fi

python -m pip install --upgrade pip
pip install bump2version
bump2version --new-version "$1" patch
2 changes: 1 addition & 1 deletion src/main/java/com/opentok/Archive.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* OpenTok Java SDK
* Copyright (C) 2022 Vonage.
* Copyright (C) 2023 Vonage.
* http://www.tokbox.com
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/opentok/ArchiveLayout.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* OpenTok Java SDK
* Copyright (C) 2022 Vonage.
* Copyright (C) 2023 Vonage.
* http://www.tokbox.com
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/opentok/ArchiveList.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* OpenTok Java SDK
* Copyright (C) 2022 Vonage.
* Copyright (C) 2023 Vonage.
* http://www.tokbox.com
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/opentok/ArchiveMode.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* OpenTok Java SDK
* Copyright (C) 2022 Vonage.
* Copyright (C) 2023 Vonage.
* http://www.tokbox.com
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/opentok/ArchiveProperties.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* OpenTok Java SDK
* Copyright (C) 2022 Vonage.
* Copyright (C) 2023 Vonage.
* http://www.tokbox.com
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/opentok/Broadcast.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* OpenTok Java SDK
* Copyright (C) 2022 Vonage.
* Copyright (C) 2023 Vonage.
* http://www.tokbox.com
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/opentok/BroadcastLayout.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* OpenTok Java SDK
* Copyright (C) 2022 Vonage.
* Copyright (C) 2023 Vonage.
* http://www.tokbox.com
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/opentok/BroadcastProperties.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* OpenTok Java SDK
* Copyright (C) 2022 Vonage.
* Copyright (C) 2023 Vonage.
* http://www.tokbox.com
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/opentok/CreatedSession.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* OpenTok Java SDK
* Copyright (C) 2022 Vonage.
* Copyright (C) 2023 Vonage.
* http://www.tokbox.com
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/opentok/Hls.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* OpenTok Java SDK
* Copyright (C) 2022 Vonage.
* Copyright (C) 2023 Vonage.
* http://www.tokbox.com
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/opentok/MediaMode.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* OpenTok Java SDK
* Copyright (C) 2022 Vonage.
* Copyright (C) 2023 Vonage.
* http://www.tokbox.com
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/opentok/MuteAllProperties.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* OpenTok Java SDK
* Copyright (C) 2022 Vonage.
* Copyright (C) 2023 Vonage.
* http://www.tokbox.com
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/com/opentok/OpenTok.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/**
* OpenTok Java SDK
* Copyright (C) 2022 Vonage.
* Copyright (C) 2023 Vonage.
* http://www.tokbox.com
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
Expand Down Expand Up @@ -37,9 +38,10 @@
*/
public class OpenTok {

private int apiKey;
private String apiSecret;
private final int apiKey;
private final String apiSecret;
protected HttpClient client;

protected static final ObjectReader
archiveReader = new ObjectMapper().readerFor(Archive.class),
archiveListReader = new ObjectMapper().readerFor(ArchiveList.class),
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/opentok/Render.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* OpenTok Java SDK
* Copyright (C) 2022 Vonage.
* Copyright (C) 2023 Vonage.
* http://www.tokbox.com
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/opentok/RenderProperties.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* OpenTok Java SDK
* Copyright (C) 2022 Vonage.
* Copyright (C) 2023 Vonage.
* http://www.tokbox.com
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/opentok/RenderStatus.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* OpenTok Java SDK
* Copyright (C) 2022 Vonage.
* Copyright (C) 2023 Vonage.
* http://www.tokbox.com
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/opentok/Role.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* OpenTok Java SDK
* Copyright (C) 2022 Vonage.
* Copyright (C) 2023 Vonage.
* http://www.tokbox.com
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/opentok/Rtmp.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* OpenTok Java SDK
* Copyright (C) 2022 Vonage.
* Copyright (C) 2023 Vonage.
* http://www.tokbox.com
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/opentok/RtmpProperties.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* OpenTok Java SDK
* Copyright (C) 2022 Vonage.
* Copyright (C) 2023 Vonage.
* http://www.tokbox.com
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/opentok/ScreenShareLayoutType.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* OpenTok Java SDK
* Copyright (C) 2022 Vonage.
* Copyright (C) 2023 Vonage.
* http://www.tokbox.com
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/opentok/Session.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* OpenTok Java SDK
* Copyright (C) 2022 Vonage.
* Copyright (C) 2023 Vonage.
* http://www.tokbox.com
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/opentok/SessionProperties.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* OpenTok Java SDK
* Copyright (C) 2022 Vonage.
* Copyright (C) 2023 Vonage.
* http://www.tokbox.com
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/opentok/SignalProperties.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* OpenTok Java SDK
* Copyright (C) 2022 Vonage.
* Copyright (C) 2023 Vonage.
* http://www.tokbox.com
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
Expand Down
Loading

0 comments on commit ed5cbc4

Please sign in to comment.