davidliu
Committed by GitHub

Fix build issues (#403)

[versions]
webrtc = "114.5735.08"
leakcanaryAndroid = "2.8.1"
preferenceKtx = "1.2.1"
androidJainSipRi = "1.3.0-91"
androidx-core = "1.10.1"
... ... @@ -24,6 +26,8 @@ material = "1.11.0"
[libraries]
android-jain-sip-ri = { module = "javax.sip:android-jain-sip-ri", version.ref = "androidJainSipRi" }
androidx-core = { module = "androidx.core:core", version.ref = "androidx-core" }
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "core-ktx" }
androidx-preference-ktx = { module = "androidx.preference:preference-ktx", version.ref = "preferenceKtx" }
audioswitch = { module = "com.github.davidliu:audioswitch", version.ref = "audioswitch" }
dagger-lib = { module = "com.google.dagger:dagger", version.ref = "dagger" }
dagger-compiler = { module = "com.google.dagger:dagger-compiler", version.ref = "dagger" }
... ... @@ -33,6 +37,7 @@ androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtim
androidx-lifecycle-common-java8 = { module = "androidx.lifecycle:lifecycle-common-java8", version.ref = "androidx-lifecycle" }
androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" }
leakcanary-android = { module = "com.squareup.leakcanary:leakcanary-android", version.ref = "leakcanaryAndroid" }
okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
protobuf-javalite = { module = "com.google.protobuf:protobuf-javalite", version.ref = "protobufJavalite" }
semver4j = { module = "com.vdurmont:semver4j", version.ref = "semver4j" }
... ... @@ -72,7 +77,6 @@ mockito-inline = { module = "org.mockito:mockito-inline", version = "4.11.0" }
robolectric = { module = "org.robolectric:robolectric", version = "4.11.1" }
turbine = { module = "app.cash.turbine:turbine", version = "1.0.0" }
core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "core-ktx" }
appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
... ...
... ... @@ -8,6 +8,14 @@ java {
sourceCompatibility = java_version
targetCompatibility = java_version
}
// From Gradle 8 onwards, Kapt no longer automatically picks up jvmTarget
// from normal KotlinOptions. Must be manually set.
// JvmToolchain should not be used since it changes the actual JDK used.
tasks.withType(org.jetbrains.kotlin.gradle.tasks.BaseKotlinCompile).configureEach {
kotlinOptions {
jvmTarget = java_version
}
}
compileKotlin {
kotlinOptions {
jvmTarget = java_version
... ...
... ... @@ -252,7 +252,7 @@ class MediaTrackEqualsDetectorTest {
fun mediaStreamTrack(): TestFile {
return java(
"""
package livekit.org.webrtc.;
package livekit.org.webrtc;
class MediaStreamTrack {
int getId(){
... ...
... ... @@ -5,12 +5,12 @@ plugins {
android {
namespace 'io.livekit.android.sample.basic'
compileSdk 33
compileSdk 34
defaultConfig {
applicationId "io.livekit.android.sample.basic"
minSdk 21
targetSdk 33
targetSdk 34
versionCode 1
versionName "1.0"
... ...
... ... @@ -59,19 +59,19 @@ dependencies {
// 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.androidx.core.ktx
api libs.appcompat
api libs.material
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.androidx.lifecycle.runtime.ktx
api libs.androidx.lifecycle.viewmodel.ktx
api libs.androidx.lifecycle.common.java8
api libs.protobuf.javalite
api 'androidx.preference:preference-ktx:1.1.1'
api libs.androidx.preference.ktx
// 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'
debugImplementation libs.leakcanary.android
testImplementation libs.junit
androidTestImplementation libs.androidx.test.core
}
... ...
package io.livekit.android.sample
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import org.junit.Assert.*
import org.junit.Test
import org.junit.runner.RunWith
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("io.livekit.android.sample", appContext.packageName)
}
}