Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,23 @@ jobs:
- name: Checkout the repo
uses: actions/checkout@v4

- name: Setup Java
# Install the target JDK first so Gradle's toolchain auto-detection can
# find it for compiling main sources via javaToolchains.compilerFor.
- name: Setup target JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'

# Gradle 9.x requires JVM 17+ to run. This overrides JAVA_HOME to Java 17
# so the wrapper starts, while the target JDK above is used by the toolchain
# to compile main sources with -PjavaTarget=${{ matrix.java }}.
- name: Setup Java 17 to run Gradle
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'zulu'

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

Expand All @@ -48,7 +59,7 @@ jobs:
restore-keys: ${{ runner.os }}-gradle

- name: Build with Gradle
run: ./gradlew build -x test
run: ./gradlew build -x test -PjavaTarget=${{ matrix.java }}

test:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -78,7 +89,7 @@ jobs:
restore-keys: ${{ runner.os }}-gradle

- name: Build with Gradle
run: ./gradlew build
run: ./gradlew build -PjavaTarget=${{ matrix.java }}

- name: Run Codecov
uses: codecov/codecov-action@v4
9 changes: 9 additions & 0 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ this project. If you use this package within your own software as is but don't p
do not have it already installed, you won't need to install it. The gradle wrapper is included in the project and you
can invoke it using `./gradlew` substituted for `gradle`.

## Java Requirements

* **Building** requires **Java 17 or later** (Gradle 9.x requires JVM 17+ to run).
* **Runtime support**: the compiled SDK JAR is compatible with **Java 8 and later** JREs.

These are separate concerns. You can build with Java 17/21/25 and the output will run on Java 8+.
The `compileJava` task uses `--release 8`, which enforces both bytecode version and API compatibility
against the Java 8 class library, preventing accidental use of Java 9+ APIs.

## Tasks

### Building
Expand Down
20 changes: 19 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,29 @@ dependencies {
implementation 'org.bitbucket.b_c:jose4j:0.9.6'
}

// The target Java version for compiling main sources. Pass -PjavaTarget=11
// (or 17, etc.) on the command line to test against a different version.
// Defaults to 8, the minimum supported runtime version.
def targetJava = project.findProperty('javaTarget') ? Integer.parseInt(project.findProperty('javaTarget').toString()) : 8

java {
sourceCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.toVersion(targetJava)
targetCompatibility = sourceCompatibility
}

// Use the JDK matching targetJava via Gradle toolchains. For Java 9+, enforce
// API compatibility with --release. For Java 8, --release is not supported by
// javac 8, so sourceCompatibility/targetCompatibility (set above) suffice.
compileJava {
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(targetJava)
}
if (targetJava >= 9) {
options.release = targetJava
}
}

// Tests always compile and run on Java 21 regardless of the target version.
compileTestJava {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = sourceCompatibility
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/Archive.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/ArchiveLayout.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/ArchiveList.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/ArchiveMode.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/ArchiveProperties.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/AudioConnector.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/AudioConnectorProperties.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/Broadcast.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/BroadcastLayout.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/BroadcastProperties.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/Caption.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/CaptionProperties.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/CreatedSession.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/Hls.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/MediaMode.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/MuteAllProperties.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/OpenTok.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/Render.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/RenderProperties.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/RenderStatus.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/Resolution.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/Role.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/Rtmp.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/RtmpProperties.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/ScreenShareLayoutType.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/Session.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/SessionProperties.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/opentok/SignalProperties.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* OpenTok Java SDK
* Copyright (C) 2025 Vonage.
* Copyright (C) 2026 Vonage.
* http://www.tokbox.com
*
*
* Licensed under The MIT License (MIT). See LICENSE file for more information.
*/
package com.opentok;
Expand Down
Loading
Loading