build.gradle
2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-parcelize'
}
def getDefaultUrl() {
return hasProperty('livekitSampleUrl') ? livekitSampleUrl : "ws://www.example.com"
}
def getDefaultToken() {
return hasProperty('livekitSampleToken') ? livekitSampleToken : ""
}
final url = getDefaultUrl()
final token = getDefaultToken()
android {
namespace "io.livekit.android.sample.common"
compileSdk androidSdk.compileVersion
defaultConfig {
minSdk androidSdk.minVersion
targetSdk androidSdk.targetVersion
consumerProguardFiles 'consumer-rules.pro'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
buildConfigField "String", "DEFAULT_URL", "\"$url\""
buildConfigField "String", "DEFAULT_TOKEN", "\"$token\""
}
debug {
buildConfigField "String", "DEFAULT_URL", "\"$url\""
buildConfigField "String", "DEFAULT_TOKEN", "\"$token\""
}
}
buildFeatures {
buildConfig = true
}
compileOptions {
sourceCompatibility java_version
targetCompatibility java_version
}
kotlinOptions {
jvmTarget = java_version
}
}
dependencies {
// If building the sample app outside the context of this repo, replace the following with:
// api "io.livekit:livekit-android:<version>"
api project(":livekit-android-sdk")
api "androidx.core:core-ktx:${libs.versions.androidx.core.get()}"
api 'androidx.appcompat:appcompat:1.4.0'
api 'com.google.android.material:material:1.4.0'
api libs.coroutines.lib
api libs.timber
api "androidx.lifecycle:lifecycle-runtime-ktx:${libs.versions.androidx.lifecycle.get()}"
api "androidx.lifecycle:lifecycle-viewmodel-ktx:${libs.versions.androidx.lifecycle.get()}"
api "androidx.lifecycle:lifecycle-common-java8:${libs.versions.androidx.lifecycle.get()}"
api libs.protobuf.javalite
api 'androidx.preference:preference-ktx:1.1.1'
// debugImplementation because LeakCanary should only run in debug builds.
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.8.1'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}