|
1 |
| -import java.nio.file.Paths |
2 |
| - |
3 | 1 | buildscript {
|
4 |
| - ext.getExtOrDefault = {name, fallback -> |
5 |
| - return rootProject.ext.has(name) ? rootProject.ext.get(name) : fallback |
6 |
| - } |
| 2 | + ext.getExtOrDefault = {name, fallback -> |
| 3 | + return rootProject.ext.has(name) ? rootProject.ext.get(name) : fallback |
| 4 | + } |
7 | 5 |
|
8 |
| - repositories { |
9 |
| - google() |
10 |
| - mavenCentral() |
11 |
| - maven { url 'https://central.sonatype.com/repository/maven-snapshots/' } |
12 |
| - } |
13 |
| - |
14 |
| - dependencies { |
15 |
| - classpath("com.android.tools.build:gradle:7.3.1") |
16 |
| - // noinspection DifferentKotlinGradleVersion |
17 |
| - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion', '1.8.10')}" |
18 |
| - } |
| 6 | + repositories { |
| 7 | + google() |
| 8 | + mavenCentral() |
| 9 | + } |
| 10 | + |
| 11 | + dependencies { |
| 12 | + classpath("com.android.tools.build:gradle:7.3.1") |
| 13 | + // noinspection DifferentKotlinGradleVersion |
| 14 | + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion', '1.8.10')}" |
| 15 | + } |
19 | 16 | }
|
20 | 17 |
|
21 | 18 | apply plugin: "com.android.library"
|
22 | 19 | apply plugin: "kotlin-android"
|
23 | 20 |
|
| 21 | +rootProject.allprojects { |
| 22 | + repositories { |
| 23 | + maven { |
| 24 | + name = 'Central Portal Snapshots' |
| 25 | + url = 'https://central.sonatype.com/repository/maven-snapshots/' |
| 26 | + content { |
| 27 | + // This efficiently tells Gradle to only look for this specific dependency here |
| 28 | + includeModule('io.getstream', 'stream-webrtc-android') |
| 29 | + } |
| 30 | + } |
| 31 | + } |
| 32 | +} |
| 33 | + |
| 34 | +repositories { |
| 35 | + mavenCentral() |
| 36 | + google() |
| 37 | +} |
| 38 | + |
| 39 | + |
| 40 | + |
24 | 41 | def safeExtGet(prop, fallback) {
|
25 | 42 | rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
26 | 43 | }
|
27 | 44 |
|
28 | 45 | def supportsNamespace() {
|
29 |
| - def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.') |
30 |
| - def major = parsed[0].toInteger() |
31 |
| - def minor = parsed[1].toInteger() |
| 46 | + def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.') |
| 47 | + def major = parsed[0].toInteger() |
| 48 | + def minor = parsed[1].toInteger() |
32 | 49 |
|
33 |
| - // Namespace support was added in 7.3.0 |
34 |
| - return (major == 7 && minor >= 3) || major >= 8 |
| 50 | + // Namespace support was added in 7.3.0 |
| 51 | + return (major == 7 && minor >= 3) || major >= 8 |
35 | 52 | }
|
36 | 53 |
|
37 | 54 | android {
|
@@ -63,9 +80,13 @@ android {
|
63 | 80 | }
|
64 | 81 | }
|
65 | 82 |
|
| 83 | +def kotlin_version = getExtOrDefault('kotlinVersion', '1.8.10') |
| 84 | + |
| 85 | +println "Building Stream WebRTC React Native module with Kotlin version: $kotlin_version" |
| 86 | + |
66 | 87 | dependencies {
|
67 |
| - api 'io.getstream:stream-webrtc-android:1.3.9' |
| 88 | + api 'io.getstream:stream-webrtc-android:1.3.10-SNAPSHOT' |
68 | 89 | implementation 'com.facebook.react:react-native:+'
|
69 |
| - implementation "org.jetbrains.kotlin:kotlin-stdlib:${getExtOrDefault('kotlinVersion', '1.8.10')}" |
| 90 | + implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" |
70 | 91 | implementation "androidx.core:core:1.7.0"
|
71 | 92 | }
|
0 commit comments