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
67 changes: 44 additions & 23 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,37 +1,54 @@
import java.nio.file.Paths

buildscript {
ext.getExtOrDefault = {name, fallback ->
return rootProject.ext.has(name) ? rootProject.ext.get(name) : fallback
}
ext.getExtOrDefault = {name, fallback ->
return rootProject.ext.has(name) ? rootProject.ext.get(name) : fallback
}

repositories {
google()
mavenCentral()
maven { url 'https://central.sonatype.com/repository/maven-snapshots/' }
}

dependencies {
classpath("com.android.tools.build:gradle:7.3.1")
// noinspection DifferentKotlinGradleVersion
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion', '1.8.10')}"
}
repositories {
google()
mavenCentral()
}

dependencies {
classpath("com.android.tools.build:gradle:7.3.1")
// noinspection DifferentKotlinGradleVersion
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion', '1.8.10')}"
}
}

apply plugin: "com.android.library"
apply plugin: "kotlin-android"

rootProject.allprojects {
repositories {
maven {
name = 'Central Portal Snapshots'
url = 'https://central.sonatype.com/repository/maven-snapshots/'
content {
// This efficiently tells Gradle to only look for this specific dependency here
includeModule('io.getstream', 'stream-webrtc-android')
}
}
}
}

repositories {
mavenCentral()
google()
}



def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

def supportsNamespace() {
def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
def major = parsed[0].toInteger()
def minor = parsed[1].toInteger()
def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
def major = parsed[0].toInteger()
def minor = parsed[1].toInteger()

// Namespace support was added in 7.3.0
return (major == 7 && minor >= 3) || major >= 8
// Namespace support was added in 7.3.0
return (major == 7 && minor >= 3) || major >= 8
}

android {
Expand Down Expand Up @@ -63,9 +80,13 @@ android {
}
}

def kotlin_version = getExtOrDefault('kotlinVersion', '1.8.10')

println "Building Stream WebRTC React Native module with Kotlin version: $kotlin_version"

dependencies {
api 'io.getstream:stream-webrtc-android:1.3.9'
api 'io.getstream:stream-webrtc-android:1.3.10-SNAPSHOT'
implementation 'com.facebook.react:react-native:+'
implementation "org.jetbrains.kotlin:kotlin-stdlib:${getExtOrDefault('kotlinVersion', '1.8.10')}"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "androidx.core:core:1.7.0"
}
4 changes: 4 additions & 0 deletions android/src/main/java/com/oney/WebRTCModule/WebRTCModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ public String getName() {
return "WebRTCModule";
}

public AudioDeviceModule getAudioDeviceModule() {
return mAudioDeviceModule;
}

private PeerConnection getPeerConnection(int id) {
PeerConnectionObserver pco = mPeerConnectionObservers.get(id);
return (pco == null) ? null : pco.getPeerConnection();
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stream-io/react-native-webrtc",
"version": "125.4.3",
"version": "125.4.4-alpha.1",
"repository": {
"type": "git",
"url": "git+https://github.com/GetStream/react-native-webrtc.git"
Expand Down