Browse Source

Bump some dependencies including kotlin and kotlinx

merge-requests/1990/head
Nicolas Pomepuy 3 years ago
committed by Duncan McNamara
parent
commit
da2eb89872
  1. 2
      application/app/build.gradle
  2. 2
      application/tools/build.gradle
  3. 13
      application/vlc-android/src/org/videolan/vlc/ExternalMonitor.kt
  4. 11
      build.gradle

2
application/app/build.gradle

@ -149,7 +149,7 @@ dependencies {
testImplementation "androidx.arch.core:core-testing:$rootProject.ext.archVersion"
androidTestImplementation "androidx.arch.core:core-testing:$rootProject.ext.archVersion"
androidTestImplementation "androidx.test.ext:junit:$rootProject.ext.junitExtVersion"
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:$rootProject.ext.desugarLib"
androidTestUtil "androidx.test:orchestrator:$rootProject.ext.orchestrator"
testImplementation "androidx.test:core:$rootProject.ext.testCore"
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$rootProject.ext.kotlinx_version"

2
application/tools/build.gradle

@ -24,7 +24,7 @@ android {
dependencies {
api "androidx.appcompat:appcompat:$rootProject.ext.appCompatVersion"
implementation "androidx.lifecycle:lifecycle-process:$rootProject.ext.lifecycleVersion"
implementation "androidx.preference:preference:$androidxPreferencesVersion"
implementation "androidx.preference:preference-ktx:$androidxPreferencesVersion"
api "androidx.tvprovider:tvprovider:$rootProject.ext.androidxLeanbackVersion"
implementation("com.squareup.okhttp3:logging-interceptor:4.2.1")
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$rootProject.ext.kotlinx_version"

13
application/vlc-android/src/org/videolan/vlc/ExternalMonitor.kt

@ -36,12 +36,11 @@ import android.util.Log
import androidx.core.content.getSystemService
import androidx.lifecycle.*
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.BroadcastChannel
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.channels.Channel.Factory.BUFFERED
import kotlinx.coroutines.channels.actor
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.asFlow
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.asSharedFlow
import org.videolan.medialibrary.interfaces.Medialibrary
import org.videolan.resources.ACTION_CHECK_STORAGES
import org.videolan.resources.AppContextProvider
@ -79,7 +78,7 @@ object ExternalMonitor : BroadcastReceiver(), DefaultLifecycleObserver, Coroutin
delay(100L)
Log.i("ExternalMonitor", "Storage management: unmount: ${action.uuid} - ${action.path}")
Medialibrary.getInstance().removeDevice(action.uuid, action.path)
storageChannel.trySend(action)
storageChannel.tryEmit(action)
}
}
}
@ -113,10 +112,10 @@ object ExternalMonitor : BroadcastReceiver(), DefaultLifecycleObserver, Coroutin
}
@OptIn(ObsoleteCoroutinesApi::class)
private val storageChannel = BroadcastChannel<DeviceAction>(BUFFERED)
private val storageChannel = MutableSharedFlow<DeviceAction>()
@OptIn(ObsoleteCoroutinesApi::class)
val storageEvents : Flow<DeviceAction>
get() = storageChannel.asFlow()
get() = storageChannel.asSharedFlow()
private var storageObserver: WeakReference<Activity>? = null
var devices = LiveDataset<UsbDevice>()
@ -161,7 +160,7 @@ object ExternalMonitor : BroadcastReceiver(), DefaultLifecycleObserver, Coroutin
private fun notifyNewStorage(mediaMounted: MediaMounted) {
val activity = storageObserver?.get() ?: return
UiTools.newStorageDetected(activity, mediaMounted.path)
storageChannel.trySend(mediaMounted)
storageChannel.tryEmit(mediaMounted)
}
@Synchronized

11
build.gradle

@ -1,8 +1,8 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.android_plugin_version = '8.2.0'
ext.kotlin_version = '1.9.0'
ext.kotlinx_version = '1.6.0'
ext.kotlin_version = '1.9.22'
ext.kotlinx_version = '1.7.1'
repositories {
flatDir dirs: "gradle/plugins"
google()
@ -47,6 +47,7 @@ ext {
minSdkVersion = 17
targetSdkVersion = 34
compileSdkVersion = 34
desugarLib = '2.0.4'
androidxLegacyVersion = '1.0.0'
androidxCoreVersion = '1.12.0'
appCompatVersion = '1.6.1'
@ -61,15 +62,15 @@ ext {
constraintLayoutVersion = '2.1.4'
viewPager2Version = "1.0.0"
archVersion = '2.2.0'
roomVersion = '2.4.3'
pagingVersion = '3.1.1'
roomVersion = '2.6.1'
pagingVersion = '3.2.1'
junitVersion = '4.13.2'
junitExtVersion = '1.1.5'
mockito = '2.25.0'
//Retrofit 2.7 drops Android 5 support
retrofit = '2.7.1'
moshi = '1.8.0'
ktorVersion = '2.3.6'
ktorVersion = '2.3.7'
powerMock = '2.0.2'
espressoVersion = '3.5.1'
livedataTest = '1.2.0'

Loading…
Cancel
Save