chore: Update license headers to 2026#298
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Gradle 9.x requires JVM 17+ to run but the SDK output must remain compatible with Java 8 runtimes. Using options.release = 8 on compileJava enforces both bytecode version and API compatibility against the Java 8 class library. Also documents the distinction between build JDK requirement (17+) and runtime support (Java 8+) in DEVELOPING.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…trix versions Gradle 9.x requires JVM 17+ to run. The build_only matrix (8, 11, 17) now installs the target JDK first (for toolchain availability), then installs Java 17 to override JAVA_HOME so the wrapper can start. Source compatibility is enforced via options.release = 8 in build.gradle, ensuring the output bytecode is Java 8-compatible regardless of which JDK runs the build. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates project metadata and build/CI configuration to reflect 2026 licensing and clarify/enforce Java compatibility expectations for building vs. runtime.
Changes:
- Updated license headers across main and test sources from 2025 → 2026 (and removed trailing whitespace in header blocks).
- Documented build/runtime Java requirements in
DEVELOPING.md. - Enforced Java 8 API/bytecode compatibility via
compileJava { options.release = 8 }and adjusted CI to run Gradle with Java 17.
Reviewed changes
Copilot reviewed 51 out of 52 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/test/java/com/opentok/TestHelpers.java | Update license header year to 2026 and normalize header whitespace. |
| src/test/java/com/opentok/OpenTokTest.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/util/TokenGenerator.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/util/HttpClient.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/util/Crypto.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/TokenOptions.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/StreamProperties.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/StreamListProperties.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/StreamList.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/Stream.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/SipProperties.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/Sip.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/SignalProperties.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/SessionProperties.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/Session.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/ScreenShareLayoutType.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/RtmpProperties.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/Rtmp.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/Role.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/Resolution.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/RenderStatus.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/RenderProperties.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/Render.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/package-info.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/OpenTok.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/MuteAllProperties.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/MediaMode.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/Hls.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/exception/RequestException.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/exception/package-info.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/exception/OpenTokException.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/exception/InvalidArgumentException.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/CreatedSession.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/constants/Version.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/constants/package-info.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/constants/DefaultUserAgent.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/constants/DefaultApiUrl.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/CaptionProperties.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/Caption.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/BroadcastProperties.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/BroadcastLayout.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/Broadcast.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/AudioConnectorProperties.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/AudioConnector.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/ArchiveProperties.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/ArchiveMode.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/ArchiveList.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/ArchiveLayout.java | Update license header year to 2026 and normalize header whitespace. |
| src/main/java/com/opentok/Archive.java | Update license header year to 2026 and normalize header whitespace. |
| DEVELOPING.md | Document Java build (17+) vs runtime (8+) requirements and explain --release 8. |
| build.gradle | Enforce Java 8 API/bytecode compatibility via options.release = 8 for compileJava. |
| .github/workflows/build.yml | Install Java 17 to run Gradle 9.x; add an extra setup-java step intended for multi-JDK coverage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Install the target JDK first so Gradle's toolchain auto-detection can | ||
| # find it. This step sets JAVA_HOME_<version>_X64 env vars but does NOT | ||
| # set JAVA_HOME yet. | ||
| - name: Setup target JDK ${{ matrix.java }} | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: ${{ matrix.java }} | ||
| distribution: 'zulu' | ||
|
|
||
| # Gradle 9.x requires JVM 17+. This second setup-java call overrides | ||
| # JAVA_HOME to Java 17 so the wrapper can start, while the target JDK | ||
| # installed above remains available for toolchain-based compilation. | ||
| - name: Setup Java 17 to run Gradle | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: 17 | ||
| distribution: 'zulu' |
There was a problem hiding this comment.
@copilot apply changes based on this feedback
There was a problem hiding this comment.
Simplified the build_only job in commit 8813a54 — removed the java: [8, 11, 17] matrix dimension and the two-step JDK setup. Since no Gradle toolchain is configured, the matrix JDK was never actually used. The job now just installs Java 17 directly. Java 8 API/bytecode compatibility is already enforced via compileJava { options.release = 8 } in build.gradle.
…undant JDK step Agent-Logs-Url: https://github.com/opentok/Opentok-Java-SDK/sessions/6a3b098c-829e-47ee-9907-c7ed0295e319 Co-authored-by: dragonmantank <108948+dragonmantank@users.noreply.github.com>
Without a toolchain, the build_only matrix java: [8, 11, 17] was a no-op —
Gradle always compiled with Java 17 regardless of the matrix value.
Now:
- build.gradle uses javaToolchains.compilerFor to compile main sources with
the JDK matching javaTarget (default: 8)
- For Java 9+, options.release enforces strict API compatibility
- For Java 8, --release is unsupported by javac 8, so sourceCompatibility
and targetCompatibility (both set to the target version) are used instead
- CI passes -PjavaTarget=${{ matrix.java }} so each matrix entry actually
compiles with a different JDK toolchain
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The test job was running ./gradlew build without -PjavaTarget, causing build.gradle to default to javaTarget=8 and look for a Java 8 toolchain that isn't installed. Pass the matrix Java version so the toolchain resolves to the JDK that's actually available. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
No description provided.