Skip to content

Commit 519f9c8

Browse files
committed
WebRTC JVM Client. Return Android Native to properly generate legacy ABI.
1 parent 1941259 commit 519f9c8

File tree

5 files changed

+67
-2
lines changed

5 files changed

+67
-2
lines changed

Dockerfile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Use Ubuntu 24.04 as base image
2+
FROM ubuntu:24.04
3+
4+
# Set environment variables for non-interactive installation
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
ENV TZ=UTC
7+
8+
# Install system dependencies in a single layer for better caching
9+
RUN apt-get update && \
10+
apt-get install -y --no-install-recommends \
11+
curl \
12+
wget \
13+
unzip \
14+
git \
15+
ca-certificates \
16+
&& rm -rf /var/lib/apt/lists/* \
17+
&& apt-get clean
18+
19+
# Install OpenJDK 17 (separate layer for better caching)
20+
RUN apt-get update && \
21+
apt-get install -y --no-install-recommends openjdk-17-jdk && \
22+
rm -rf /var/lib/apt/lists/* && \
23+
apt-get clean
24+
25+
# Set working directory for the project
26+
WORKDIR /workspace
27+
28+
## Copy gradle wrapper and build files first (for better layer caching)
29+
COPY --chown=gradle:gradle . .
30+
31+
# Make gradlew executable
32+
RUN chmod +x ./gradlew
33+
34+
# Download dependencies (separate step for better caching)
35+
RUN ./gradlew dependencies --no-daemon || true
36+
37+
# Default command to run the ABI check
38+
CMD ["./gradlew", ":ktor-client-webrtc:checkLegacyAbi", "--no-daemon", "--no-build-cache", "--stacktrace"]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
3+
*/
4+
5+
package io.ktor.client.webrtc.utils
6+
7+
import io.ktor.client.webrtc.*
8+
import io.ktor.utils.io.ExperimentalKtorApi
9+
10+
@OptIn(ExperimentalKtorApi::class)
11+
actual fun createTestWebRtcClient(): WebRtcClient {
12+
TODO("There are no Android Native WebRTC clients now.")
13+
}
14+
15+
actual fun grantPermissions(audio: Boolean, video: Boolean) {
16+
TODO("There are no Android Native WebRTC clients now.")
17+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
* Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
3+
*/
4+
5+
package io.ktor.client.webrtc.utils
6+
7+
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
8+
actual annotation class IgnoreJvm

ktor-client/ktor-client-webrtc/api/ktor-client-webrtc.klib.api

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Klib ABI Dump
2-
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js, wasmJs]
2+
// Targets: [androidNativeArm32, androidNativeArm64, androidNativeX64, androidNativeX86, iosArm64, iosSimulatorArm64, iosX64, js, wasmJs]
33
// Alias: ios => [iosArm64, iosSimulatorArm64, iosX64]
44
// Rendering settings:
55
// - Signature version: 2

ktor-client/ktor-client-webrtc/gradle.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@
44
target.js.nodeJs=false
55
target.wasmJs.nodeJs=false
66
target.android.unitTest=false
7-
target.posix=false
7+
target.androidNative=true
8+
target.desktop=false
9+
target.darwin=false
810
target.ios=true

0 commit comments

Comments
 (0)